Create appeasement by order number - Fabric

Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

Skip to main content

Create appeasement by order number

cURL

curl --request POST \
  --url https://api.fabric.inc/v3/orders/order-number/{orderNumber}/actions/create-appeasement \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-fabric-channel-id: <x-fabric-channel-id>' \
  --header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
  --data '
{
  "source": "Storefront",
  "userId": "12",
  "appeasements": [\
    {\
      "amount": 34.56,\
      "amountInCurrencies": [\
        {\
          "currency": "USD",\
          "group": "SHOPPER",\
          "amount": 123.45\
        }\
      ],\
      "appeasementCounter": 1,\
      "attributes": {\
        "number": "XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ"\
      },\
      "invoicedAmount": 34.56,\
      "invoicedAmountInCurrencies": [\
        {\
          "currency": "USD",\
          "group": "SHOPPER",\
          "amount": 123.45\
        }\
      ],\
      "payments": [\
        {\
          "paymentCounter": 1,\
          "refundAmount": 34.56,\
          "refundAmountInCurrencies": [\
            {\
              "currency": "USD",\
              "group": "SHOPPER",\
              "amount": 123.45\
            }\
          ]\
        }\
      ],\
      "reasonCode": "Incorrect Item",\
      "refunds": [\
        {\
          "amount": "-10.",\
          "amountInCurrencies": [\
            {\
              "currency": "USD",\
              "group": "SHOPPER",\
              "amount": 123.45\
            }\
          ],\
          "name": "Name",\
          "type": "ITEM"\
        }\
      ],\
      "source": "CSR",\
      "subReasonCode": "Late shipping"\
    }\
  ],
  "customer": {
    "accountId": "62272e917b12209e68751d94",
    "company": "Demo Inc",
    "email": "test@example.com",
    "employeeId": "62272e917b12209e68751d94",
    "name": {
      "firstName": "Alex",
      "lastName": "Doe",
      "middleName": "E"
    },
    "phone": {
      "number": "123-456-7890",
      "type": "MOBILE"
    },
    "userId": "62272e917b12209e68751d94"
  },
  "items": [\
    {\
      "appeasements": [\
        {\
          "amount": 34.56,\
          "amountInCurrencies": [\
            {\
              "currency": "USD",\
              "group": "SHOPPER",\
              "amount": 123.45\
            }\
          ],\
          "appeasementCounter": 1,\
          "attributes": {\
            "number": "XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ"\
          },\
          "invoicedAmount": 34.56,\
          "invoicedAmountInCurrencies": [\
            {\
              "currency": "USD",\
              "group": "SHOPPER",\
              "amount": 123.45\
            }\
          ],\
          "payments": [\
            {\
              "paymentCounter": 1,\
              "refundAmount": 34.56,\
              "refundAmountInCurrencies": [\
                {\
                  "currency": "USD",\
                  "group": "SHOPPER",\
                  "amount": 123.45\
                }\
              ]\
            }\
          ],\
          "reasonCode": "Incorrect Item",\
          "refunds": [\
            {\
              "amount": "-10.",\
              "amountInCurrencies": [\
                {\
                  "currency": "USD",\
                  "group": "SHOPPER",\
                  "amount": 123.45\
                }\
              ],\
              "name": "Name",\
              "type": "ITEM"\
            }\
          ],\
          "source": "CSR",\
          "subReasonCode": "Late shipping"\
        }\
      ],\
      "lineItemId": "d538b1f1-0e45-43c6-bfc6-9666fc1188ca"\
    }\
  ],
  "orderExternalId": "191763090_O1231",
  "requestContext": {
    "id": "a05b72dc-78d8-4ea4-90fc-2fe6a1fe1111",
    "type": "<string>",
    "requestTime": "2022-04-12T09:30:31.198Z",
    "attributes": {
      "attribute": "N",
      "someFlag": true
    }
  }
}
'
import requests

url = "https://api.fabric.inc/v3/orders/order-number/{orderNumber}/actions/create-appeasement"

payload = {
    "source": "Storefront",
    "userId": "12",
    "appeasements": [\
        {\
            "amount": 34.56,\
            "amountInCurrencies": [\
                {\
                    "currency": "USD",\
                    "group": "SHOPPER",\
                    "amount": 123.45\
                }\
            ],\
            "appeasementCounter": 1,\
            "attributes": { "number": "XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ" },\
            "invoicedAmount": 34.56,\
            "invoicedAmountInCurrencies": [\
                {\
                    "currency": "USD",\
                    "group": "SHOPPER",\
                    "amount": 123.45\
                }\
            ],\
            "payments": [\
                {\
                    "paymentCounter": 1,\
                    "refundAmount": 34.56,\
                    "refundAmountInCurrencies": [\
                        {\
                            "currency": "USD",\
                            "group": "SHOPPER",\
                            "amount": 123.45\
                        }\
                    ]\
                }\
            ],\
            "reasonCode": "Incorrect Item",\
            "refunds": [\
                {\
                    "amount": "-10.",\
                    "amountInCurrencies": [\
                        {\
                            "currency": "USD",\
                            "group": "SHOPPER",\
                            "amount": 123.45\
                        }\
                    ],\
                    "name": "Name",\
                    "type": "ITEM"\
                }\
            ],\
            "source": "CSR",\
            "subReasonCode": "Late shipping"\
        }\
    ],
    "customer": {
        "accountId": "62272e917b12209e68751d94",
        "company": "Demo Inc",
        "email": "test@example.com",
        "employeeId": "62272e917b12209e68751d94",
        "name": {
            "firstName": "Alex",
            "lastName": "Doe",
            "middleName": "E"
        },
        "phone": {
            "number": "123-456-7890",
            "type": "MOBILE"
        },
        "userId": "62272e917b12209e68751d94"
    },
    "items": [\
        {\
            "appeasements": [\
                {\
                    "amount": 34.56,\
                    "amountInCurrencies": [\
                        {\
                            "currency": "USD",\
                            "group": "SHOPPER",\
                            "amount": 123.45\
                        }\
                    ],\
                    "appeasementCounter": 1,\
                    "attributes": { "number": "XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ" },\
                    "invoicedAmount": 34.56,\
                    "invoicedAmountInCurrencies": [\
                        {\
                            "currency": "USD",\
                            "group": "SHOPPER",\
                            "amount": 123.45\
                        }\
                    ],\
                    "payments": [\
                        {\
                            "paymentCounter": 1,\
                            "refundAmount": 34.56,\
                            "refundAmountInCurrencies": [\
                                {\
                                    "currency": "USD",\
                                    "group": "SHOPPER",\
                                    "amount": 123.45\
                                }\
                            ]\
                        }\
                    ],\
                    "reasonCode": "Incorrect Item",\
                    "refunds": [\
                        {\
                            "amount": "-10.",\
                            "amountInCurrencies": [\
                                {\
                                    "currency": "USD",\
                                    "group": "SHOPPER",\
                                    "amount": 123.45\
                                }\
                            ],\
                            "name": "Name",\
                            "type": "ITEM"\
                        }\
                    ],\
                    "source": "CSR",\
                    "subReasonCode": "Late shipping"\
                }\
            ],\
            "lineItemId": "d538b1f1-0e45-43c6-bfc6-9666fc1188ca"\
        }\
    ],
    "orderExternalId": "191763090_O1231",
    "requestContext": {
        "id": "a05b72dc-78d8-4ea4-90fc-2fe6a1fe1111",
        "type": "<string>",
        "requestTime": "2022-04-12T09:30:31.198Z",
        "attributes": {
            "attribute": "N",
            "someFlag": True
        }
    }
}
headers = {
    "x-fabric-tenant-id": "<x-fabric-tenant-id>",
    "x-fabric-channel-id": "<x-fabric-channel-id>",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {
    'x-fabric-tenant-id': '<x-fabric-tenant-id>',
    'x-fabric-channel-id': '<x-fabric-channel-id>',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    source: 'Storefront',
    userId: '12',
    appeasements: [\
      {\
        amount: 34.56,\
        amountInCurrencies: [{currency: 'USD', group: 'SHOPPER', amount: 123.45}],\
        appeasementCounter: 1,\
        attributes: {number: 'XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ'},\
        invoicedAmount: 34.56,\
        invoicedAmountInCurrencies: [{currency: 'USD', group: 'SHOPPER', amount: 123.45}],\
        payments: [\
          {\
            paymentCounter: 1,\
            refundAmount: 34.56,\
            refundAmountInCurrencies: [{currency: 'USD', group: 'SHOPPER', amount: 123.45}]\
          }\
        ],\
        reasonCode: 'Incorrect Item',\
        refunds: [\
          {\
            amount: '-10.',\
            amountInCurrencies: [{currency: 'USD', group: 'SHOPPER', amount: 123.45}],\
            name: 'Name',\
            type: 'ITEM'\
          }\
        ],\
        source: 'CSR',\
        subReasonCode: 'Late shipping'\
      }\
    ],
    customer: {
      accountId: '62272e917b12209e68751d94',
      company: 'Demo Inc',
      email: 'test@example.com',
      employeeId: '62272e917b12209e68751d94',
      name: {firstName: 'Alex', lastName: 'Doe', middleName: 'E'},
      phone: {number: '123-456-7890', type: 'MOBILE'},
      userId: '62272e917b12209e68751d94'
    },
    items: [\
      {\
        appeasements: [\
          {\
            amount: 34.56,\
            amountInCurrencies: [{currency: 'USD', group: 'SHOPPER', amount: 123.45}],\
            appeasementCounter: 1,\
            attributes: {number: 'XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ'},\
            invoicedAmount: 34.56,\
            invoicedAmountInCurrencies: [{currency: 'USD', group: 'SHOPPER', amount: 123.45}],\
            payments: [\
              {\
                paymentCounter: 1,\
                refundAmount: 34.56,\
                refundAmountInCurrencies: [{currency: 'USD', group: 'SHOPPER', amount: 123.45}]\
              }\
            ],\
            reasonCode: 'Incorrect Item',\
            refunds: [\
              {\
                amount: '-10.',\
                amountInCurrencies: [{currency: 'USD', group: 'SHOPPER', amount: 123.45}],\
                name: 'Name',\
                type: 'ITEM'\
              }\
            ],\
            source: 'CSR',\
            subReasonCode: 'Late shipping'\
          }\
        ],\
        lineItemId: 'd538b1f1-0e45-43c6-bfc6-9666fc1188ca'\
      }\
    ],
    orderExternalId: '191763090_O1231',
    requestContext: {
      id: 'a05b72dc-78d8-4ea4-90fc-2fe6a1fe1111',
      type: '<string>',
      requestTime: '2022-04-12T09:30:31.198Z',
      attributes: {attribute: 'N', someFlag: true}
    }
  })
};

fetch('https://api.fabric.inc/v3/orders/order-number/{orderNumber}/actions/create-appeasement', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [\
  CURLOPT_URL => "https://api.fabric.inc/v3/orders/order-number/{orderNumber}/actions/create-appeasement",\
  CURLOPT_RETURNTRANSFER => true,\
  CURLOPT_ENCODING => "",\
  CURLOPT_MAXREDIRS => 10,\
  CURLOPT_TIMEOUT => 30,\
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\
  CURLOPT_CUSTOMREQUEST => "POST",\
  CURLOPT_POSTFIELDS => json_encode([\
    'source' => 'Storefront',\
    'userId' => '12',\
    'appeasements' => [\
        [\
                'amount' => 34.56,\
                'amountInCurrencies' => [\
                                [\
                                                                'currency' => 'USD',\
                                                                'group' => 'SHOPPER',\
                                                                'amount' => 123.45\
                                ]\
                ],\
                'appeasementCounter' => 1,\
                'attributes' => [\
                                'number' => 'XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ'\
                ],\
                'invoicedAmount' => 34.56,\
                'invoicedAmountInCurrencies' => [\
                                [\
                                                                'currency' => 'USD',\
                                                                'group' => 'SHOPPER',\
                                                                'amount' => 123.45\
                                ]\
                ],\
                'payments' => [\
                                [\
                                                                'paymentCounter' => 1,\
                                                                'refundAmount' => 34.56,\
                                                                'refundAmountInCurrencies' => [\
                                                                                                                                [\
                                                                                                                                                                                                                                                                'currency' => 'USD',\
                                                                                                                                                                                                                                                                'group' => 'SHOPPER',\
                                                                                                                                                                                                                                                                'amount' => 123.45\
                                                                                                                                ]\
                                                                ]\
                                ]\
                ],\
                'reasonCode' => 'Incorrect Item',\
                'refunds' => [\
                                [\
                                                                'amount' => '-10.',\
                                                                'amountInCurrencies' => [\
                                                                                                                                [\
                                                                                                                                                                                                                                                                'currency' => 'USD',\
                                                                                                                                                                                                                                                                'group' => 'SHOPPER',\
                                                                                                                                                                                                                                                                'amount' => 123.45\
                                                                                                                                ]\
                                                                ],\
                                                                'name' => 'Name',\
                                                                'type' => 'ITEM'\
                                ]\
                ],\
                'source' => 'CSR',\
                'subReasonCode' => 'Late shipping'\
        ]\
    ],\
    'customer' => [\
        'accountId' => '62272e917b12209e68751d94',\
        'company' => 'Demo Inc',\
        'email' => 'test@example.com',\
        'employeeId' => '62272e917b12209e68751d94',\
        'name' => [\
                'firstName' => 'Alex',\
                'lastName' => 'Doe',\
                'middleName' => 'E'\
        ],\
        'phone' => [\
                'number' => '123-456-7890',\
                'type' => 'MOBILE'\
        ],\
        'userId' => '62272e917b12209e68751d94'\
    ],\
    'items' => [\
        [\
                'appeasements' => [\
                                [\
                                                                'amount' => 34.56,\
                                                                'amountInCurrencies' => [\
                                                                                                                                [\
                                                                                                                                                                                                                                                                'currency' => 'USD',\
                                                                                                                                                                                                                                                                'group' => 'SHOPPER',\
                                                                                                                                                                                                                                                                'amount' => 123.45\
                                                                                                                                ]\
                                                                ],\
                                                                'appeasementCounter' => 1,\
                                                                'attributes' => [\
                                                                                                                                'number' => 'XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ'\
                                                                ],\
                                                                'invoicedAmount' => 34.56,\
                                                                'invoicedAmountInCurrencies' => [\
                                                                                                                                [\
                                                                                                                                                                                                                                                                'currency' => 'USD',\
                                                                                                                                                                                                                                                                'group' => 'SHOPPER',\
                                                                                                                                                                                                                                                                'amount' => 123.45\
                                                                                                                                ]\
                                                                ],\
                                                                'payments' => [\
                                                                                                                                [\
                                                                                                                                                                                                                                                                'paymentCounter' => 1,\
                                                                                                                                                                                                                                                                'refundAmount' => 34.56,\
                                                                                                                                                                                                                                                                'refundAmountInCurrencies' => [\
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [\
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                'currency' => 'USD',\
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                'group' => 'SHOPPER',\
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                'amount' => 123.45\
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ]\
                                                                                                                                                                                                                                                                ]\
                                                                                                                                ]\
                                                                ],\
                                                                'reasonCode' => 'Incorrect Item',\
                                                                'refunds' => [\
                                                                                                                                [\
                                                                                                                                                                                                                                                                'amount' => '-10.',\
                                                                                                                                                                                                                                                                'amountInCurrencies' => [\
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [\
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                'currency' => 'USD',\
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                'group' => 'SHOPPER',\
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                'amount' => 123.45\
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ]\
                                                                                                                                                                                                                                                                ],\
                                                                                                                                                                                                                                                                'name' => 'Name',\
                                                                                                                                                                                                                                                                'type' => 'ITEM'\
                                                                                                                                ]\
                                                                ],\
                                                                'source' => 'CSR',\
                                                                'subReasonCode' => 'Late shipping'\
                                ]\
                ],\
                'lineItemId' => 'd538b1f1-0e45-43c6-bfc6-9666fc1188ca'\
        ]\
    ],\
    'orderExternalId' => '191763090_O1231',\
    'requestContext' => [\
        'id' => 'a05b72dc-78d8-4ea4-90fc-2fe6a1fe1111',\
        'type' => '<string>',\
        'requestTime' => '2022-04-12T09:30:31.198Z',\
        'attributes' => [\
                'attribute' => 'N',\
                'someFlag' => true\
        ]\
    ]\
  ]),\
  CURLOPT_HTTPHEADER => [\
    "Authorization: Bearer <token>",\
    "Content-Type: application/json",\
    "x-fabric-channel-id: <x-fabric-channel-id>",\
    "x-fabric-tenant-id: <x-fabric-tenant-id>"\
  ],\
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io"
)

func main() {

url := "https://api.fabric.inc/v3/orders/order-number/{orderNumber}/actions/create-appeasement"

payload := strings.NewReader("{\n  \"source\": \"Storefront\",\n  \"userId\": \"12\",\n  \"appeasements\": [\n    {\n      \"amount\": 34.56,\n      \"amountInCurrencies\": [\n        {\n          \"currency\": \"USD\",\n          \"group\": \"SHOPPER\",\n          \"amount\": 123.45\n        }\n      ],\n      \"appeasementCounter\": 1,\n      \"attributes\": {\n        \"number\": \"XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ\"\n      },\n      \"invoicedAmount\": 34.56,\n      \"invoicedAmountInCurrencies\": [\n        {\n          \"currency\": \"USD\",\n          \"group\": \"SHOPPER\",\n          \"amount\": 123.45\n        }\n      ],\n      \"payments\": [\n        {\n          \"paymentCounter\": 1,\n          \"refundAmount\": 34.56,\n          \"refundAmountInCurrencies\": [\n            {\n              \"currency\": \"USD\",\n              \"group\": \"SHOPPER\",\n              \"amount\": 123.45\n            }\n          ]\n        }\n      ],\n      \"reasonCode\": \"Incorrect Item\",\n      \"refunds\": [\n        {\n          \"amount\": \"-10.\",\n          \"amountInCurrencies\": [\n            {\n              \"currency\": \"USD\",\n              \"group\": \"SHOPPER\",\n              \"amount\": 123.45\n            }\n          ],\n          \"name\": \"Name\",\n          \"type\": \"ITEM\"\n        }\n      ],\n      \"source\": \"CSR\",\n      \"subReasonCode\": \"Late shipping\"\n    }\n  ],\n  \"customer\": {\n    \"accountId\": \"62272e917b12209e68751d94\",\n    \"company\": \"Demo Inc\",\n    \"email\": \"test@example.com\",\n    \"employeeId\": \"62272e917b12209e68751d94\",\n    \"name\": {\n      \"firstName\": \"Alex\",\n      \"lastName\": \"Doe\",\n      \"middleName\": \"E\"\n    },\n    \"phone\": {\n      \"number\": \"123-456-7890\",\n      \"type\": \"MOBILE\"\n    },\n    \"userId\": \"62272e917b12209e68751d94\"\n  },\n  \"items\": [\n    {\n      \"appeasements\": [\n        {\n          \"amount\": 34.56,\n          \"amountInCurrencies\": [\n            {\n              \"currency\": \"USD\",\n              \"group\": \"SHOPPER\",\n              \"amount\": 123.45\n            }\n          ],\n          \"appeasementCounter\": 1,\n          \"attributes\": {\n            \"number\": \"XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ\"\n          },\n          \"invoicedAmount\": 34.56,\n          \"invoicedAmountInCurrencies\": [\n            {\n              \"currency\": \"USD\",\n              \"group\": \"SHOPPER\",\n              \"amount\": 123.45\n            }\n          ],\n          \"payments\": [\n            {\n              \"paymentCounter\": 1,\n              \"refundAmount\": 34.56,\n              \"refundAmountInCurrencies\": [\n                {\n                  \"currency\": \"USD\",\n                  \"group\": \"SHOPPER\",\n                  \"amount\": 123.45\n                }\n              ]\n            }\n          ],\n          \"reasonCode\": \"Incorrect Item\",\n          \"refunds\": [\n            {\n              \"amount\": \"-10.\",\n              \"amountInCurrencies\": [\n                {\n                  \"currency\": \"USD\",\n                  \"group\": \"SHOPPER\",\n                  \"amount\": 123.45\n                }\n              ],\n              \"name\": \"Name\",\n              \"type\": \"ITEM\"\n            }\n          ],\n          \"source\": \"CSR\",\n          \"subReasonCode\": \"Late shipping\"\n        }\n      ],\n      \"lineItemId\": \"d538b1f1-0e45-43c6-bfc6-9666fc1188ca\"\n    }\n  ],\n  \"orderExternalId\": \"191763090_O1231\",\n  \"requestContext\": {\n    \"id\": \"a05b72dc-78d8-4ea4-90fc-2fe6a1fe1111\",\n    \"type\": \"<string>\",\n    \"requestTime\": \"2022-04-12T09:30:31.198Z\",\n    \"attributes\": {\n      \"attribute\": \"N\",\n      \"someFlag\": true\n    }\n  }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-fabric-tenant-id", "<x-fabric-tenant-id>")
    req.Header.Add("x-fabric-channel-id", "<x-fabric-channel-id>")
    req.Header.Add("Authorization", "Bearer <token>")
    req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
    body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.fabric.inc/v3/orders/order-number/{orderNumber}/actions/create-appeasement")
  .header("x-fabric-tenant-id", "<x-fabric-tenant-id>")
  .header("x-fabric-channel-id", "<x-fabric-channel-id>")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"source\": \"Storefront\",\n  \"userId\": \"12\",\n  \"appeasements\": [\n    {\n      \"amount\": 34.56,\n      \"amountInCurrencies\": [\n        {\n          \"currency\": \"USD\",\n          \"group\": \"SHOPPER\",\n          \"amount\": 123.45\n        }\n      ],\n      \"appeasementCounter\": 1,\n      \"attributes\": {\n        \"number\": \"XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ\"\n      },\n      \"invoicedAmount\": 34.56,\n      \"invoicedAmountInCurrencies\": [\n        {\n          \"currency\": \"USD\",\n          \"group\": \"SHOPPER\",\n          \"amount\": 123.45\n        }\n      ],\n      \"payments\": [\n        {\n          \"paymentCounter\": 1,\n          \"refundAmount\": 34.56,\n          \"refundAmountInCurrencies\": [\n            {\n              \"currency\": \"USD\",\n              \"group\": \"SHOPPER\",\n              \"amount\": 123.45\n            }\n          ]\n        }\n      ],\n      \"reasonCode\": \"Incorrect Item\",\n      \"refunds\": [\n        {\n          \"amount\": \"-10.\",\n          \"amountInCurrencies\": [\n            {\n              \"currency\": \"USD\",\n              \"group\": \"SHOPPER\",\n              \"amount\": 123.45\n            }\n          ],\n          \"name\": \"Name\",\n          \"type\": \"ITEM\"\n        }\n      ],\n      \"source\": \"CSR\",\n      \"subReasonCode\": \"Late shipping\"\n    }\n  ],\n  \"customer\": {\n    \"accountId\": \"62272e917b12209e68751d94\",\n    \"company\": \"Demo Inc\",\n    \"email\": \"test@example.com\",\n    \"employeeId\": \"62272e917b12209e68751d94\",\n    \"name\": {\n      \"firstName\": \"Alex\",\n      \"lastName\": \"Doe\",\n      \"middleName\": \"E\"\n    },\n    \"phone\": {\n      \"number\": \"123-456-7890\",\n      \"type\": \"MOBILE\"\n    },\n    \"userId\": \"62272e917b12209e68751d94\"\n  },\n  \"items\": [\n    {\n      \"appeasements\": [\n        {\n          \"amount\": 34.56,\n          \"amountInCurrencies\": [\n            {\n              \"currency\": \"USD\",\n              \"group\": \"SHOPPER\",\n              \"amount\": 123.45\n            }\n          ],\n          \"appeasementCounter\": 1,\n          \"attributes\": {\n            \"number\": \"XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ\"\n          },\n          \"invoicedAmount\": 34.56,\n          \"invoicedAmountInCurrencies\": [\n            {\n              \"currency\": \"USD\",\n              \"group\": \"SHOPPER\",\n              \"amount\": 123.45\n            }\n          ],\n          \"payments\": [\n            {\n              \"paymentCounter\": 1,\n              \"refundAmount\": 34.56,\n              \"refundAmountInCurrencies\": [\n                {\n                  \"currency\": \"USD\",\n                  \"group\": \"SHOPPER\",\n                  \"amount\": 123.45\n                }\n              ]\n            }\n          ],\n          \"reasonCode\": \"Incorrect Item\",\n          \"refunds\": [\n            {\n              \"amount\": \"-10.\",\n              \"amountInCurrencies\": [\n                {\n                  \"currency\": \"USD\",\n                  \"group\": \"SHOPPER\",\n                  \"amount\": 123.45\n                }\n              ],\n              \"name\": \"Name\",\n              \"type\": \"ITEM\"\n            }\n          ],\n          \"source\": \"CSR\",\n          \"subReasonCode\": \"Late shipping\"\n        }\n      ],\n      \"lineItemId\": \"d538b1f1-0e45-43c6-bfc6-9666fc1188ca\"\n    }\n  ],\n  \"orderExternalId\": \"191763090_O1231\",\n  \"requestContext\": {\n    \"id\": \"a05b72dc-78d8-4ea4-90fc-2fe6a1fe1111\",\n    \"type\": \"<string>\",\n    \"requestTime\": \"2022-04-12T09:30:31.198Z\",\n    \"attributes\": {\n      \"attribute\": \"N\",\n      \"someFlag\": true\n    }\n  }\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.fabric.inc/v3/orders/order-number/{orderNumber}/actions/create-appeasement")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-fabric-tenant-id"] = '<x-fabric-tenant-id>'
request["x-fabric-channel-id"] = '<x-fabric-channel-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"source\": \"Storefront\",\n  \"userId\": \"12\",\n  \"appeasements\": [\n    {\n      \"amount\": 34.56,\n      \"amountInCurrencies\": [\n        {\n          \"currency\": \"USD\",\n          \"group\": \"SHOPPER\",\n          \"amount\": 123.45\n        }\n      ],\n      \"appeasementCounter\": 1,\n      \"attributes\": {\n        \"number\": \"XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ\"\n      },\n      \"invoicedAmount\": 34.56,\n      \"invoicedAmountInCurrencies\": [\n        {\n          \"currency\": \"USD\",\n          \"group\": \"SHOPPER\",\n          \"amount\": 123.45\n        }\n      ],\n      \"payments\": [\n        {\n          \"paymentCounter\": 1,\n          \"refundAmount\": 34.56,\n          \"refundAmountInCurrencies\": [\n            {\n              \"currency\": \"USD\",\n              \"group\": \"SHOPPER\",\n              \"amount\": 123.45\n            }\n          ]\n        }\n      ],\n      \"reasonCode\": \"Incorrect Item\",\n      \"refunds\": [\n        {\n          \"amount\": \"-10.\",\n          \"amountInCurrencies\": [\n            {\n              \"currency\": \"USD\",\n              \"group\": \"SHOPPER\",\n              \"amount\": 123.45\n            }\n          ],\n          \"name\": \"Name\",\n          \"type\": \"ITEM\"\n        }\n      ],\n      \"source\": \"CSR\",\n      \"subReasonCode\": \"Late shipping\"\n    }\n  ],\n  \"customer\": {\n    \"accountId\": \"62272e917b12209e68751d94\",\n    \"company\": \"Demo Inc\",\n    \"email\": \"test@example.com\",\n    \"employeeId\": \"62272e917b12209e68751d94\",\n    \"name\": {\n      \"firstName\": \"Alex\",\n      \"lastName\": \"Doe\",\n      \"middleName\": \"E\"\n    },\n    \"phone\": {\n      \"number\": \"123-456-7890\",\n      \"type\": \"MOBILE\"\n    },\n    \"userId\": \"62272e917b12209e68751d94\"\n  },\n  \"items\": [\n    {\n      \"appeasements\": [\n        {\n          \"amount\": 34.56,\n          \"amountInCurrencies\": [\n            {\n              \"currency\": \"USD\",\n              \"group\": \"SHOPPER\",\n              \"amount\": 123.45\n            }\n          ],\n          \"appeasementCounter\": 1,\n          \"attributes\": {\n            \"number\": \"XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ\"\n          },\n          \"invoicedAmount\": 34.56,\n          \"invoicedAmountInCurrencies\": [\n            {\n              \"currency\": \"USD\",\n              \"group\": \"SHOPPER\",\n              \"amount\": 123.45\n            }\n          ],\n          \"payments\": [\n            {\n              \"paymentCounter\": 1,\n              \"refundAmount\": 34.56,\n              \"refundAmountInCurrencies\": [\n                {\n                  \"currency\": \"USD\",\n                  \"group\": \"SHOPPER\",\n                  \"amount\": 123.45\n                }\n              ]\n            }\n          ],\n          \"reasonCode\": \"Incorrect Item\",\n          \"refunds\": [\n            {\n              \"amount\": \"-10.\",\n              \"amountInCurrencies\": [\n                {\n                  \"currency\": \"USD\",\n                  \"group\": \"SHOPPER\",\n                  \"amount\": 123.45\n                }\n              ],\n              \"name\": \"Name\",\n              \"type\": \"ITEM\"\n            }\n          ],\n          \"source\": \"CSR\",\n          \"subReasonCode\": \"Late shipping\"\n        }\n      ],\n      \"lineItemId\": \"d538b1f1-0e45-43c6-bfc6-9666fc1188ca\"\n    }\n  ],\n  \"orderExternalId\": \"191763090_O1231\",\n  \"requestContext\": {\n    \"id\": \"a05b72dc-78d8-4ea4-90fc-2fe6a1fe1111\",\n    \"type\": \"<string>\",\n    \"requestTime\": \"2022-04-12T09:30:31.198Z\",\n    \"attributes\": {\n      \"attribute\": \"N\",\n      \"someFlag\": true\n    }\n  }\n}"

response = http.request(request)
puts response.read_body

200

400

401

404

500

{
  "orderNumber": "12",
  "totalAmountRefunded": 25.5,
  "totalAmountRefundedInCurrencies": [\
    {\
      "currency": "USD",\
      "group": "SHOPPER",\
      "amount": 123.45\
    }\
  ]
}
{
  "errors": [\
    {\
      "message": "Invalid request",\
      "type": "CLIENT_ERROR"\
    }\
  ],
  "message": "Bad request",
  "type": "CLIENT_ERROR"
}
{
  "message": "Unauthorized request",
  "type": "CLIENT_ERROR"
}
{
  "message": "Not found",
  "type": "CLIENT_ERROR"
}
{
  "message": "Internal server error",
  "type": "SERVER_ERROR"
}

POST

/

orders

/

order-number

/

{orderNumber}

/

actions

/

create-appeasement

Try it

Create appeasement by order number

cURL

import requests

url = "https://api.fabric.inc/v3/orders/order-number/{orderNumber}/actions/create-appeasement"

response = requests.post(url, json=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io"
)

func main() {

url := "https://api.fabric.inc/v3/orders/order-number/{orderNumber}/actions/create-appeasement"

req, _ := http.NewRequest("POST", url, payload)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
    body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
require 'uri'
require 'net/http'

url = URI("https://api.fabric.inc/v3/orders/order-number/{orderNumber}/actions/create-appeasement")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

response = http.request(request)
puts response.read_body

200

400

401

404

500

{
  "errors": [\
    {\
      "message": "Invalid request",\
      "type": "CLIENT_ERROR"\
    }\
  ],
  "message": "Bad request",
  "type": "CLIENT_ERROR"
}
{
  "message": "Unauthorized request",
  "type": "CLIENT_ERROR"
}
{
  "message": "Not found",
  "type": "CLIENT_ERROR"
}
{
  "message": "Internal server error",
  "type": "SERVER_ERROR"
}

Authorizations

​

Authorization

string

header

required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

​

x-fabric-tenant-id

string

required

A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from Copilot. This header is required.

​

x-fabric-channel-id

string

required

x-fabric-channel-id identifies the sales channel where the API request is being made; primarily for multichannel use cases. The channel ids are 12 corresponding to US and 13 corresponding to Canada. The default channel id is 12. This field is required.

​

x-fabric-request-id

string

Unique request ID

Path Parameters

​

orderNumber

string

required

Merchant-defined order identifier

Body

application/json

Appeasement request

​

source

string

required

Merchant-defined source from where the appeasement request was initiated. There are no pre-defined values; possible values are Customer Service Representative (CSR), point-of-sale (POS), etc.

Example:

"Storefront"

​

userId

string

required

Identifier of the logged in user who initiated the request. This could be from either fabric Identity service or an external Identity service.

Example:

"12"

​

appeasements

object[]

Order-level appeasement details. At least one order-level or item-level appeasement must be added.

Show child attributes

​

customer

object

Invoice customer

Show child attributes

​

items

object[]

Item-level appeasements. At least one order-level or item-level appeasement must be added.

Show child attributes

​

orderExternalId

string

A merchant-defined external order identifier.

This field is optional and can be used to reference the order in external systems such as an ERP, OMS, or CRM.

Example:

"191763090_O1231"

​

requestContext

object

Request reference context information

Show child attributes

Response

200

application/json

OK

Appeasement info

​

orderNumber

string

Merchant-defined order identifier. If omitted, this is generated by fabric's sequence generator using Configuration service

Example:

"12"

​

totalAmountRefunded

number

Total refunded amount

Example:

25.5

​

totalAmountRefundedInCurrencies

object[]

The total amount that has been refunded, represented in one or more currencies.

Each entry provides the total refunded value and its corresponding currency code,

using the structure defined in the amountInCurrency schema.

This field enables tracking of cumulative refunds across multiple currencies.

Show child attributes

Was this page helpful?

YesNo

Create appeasement by order ID Overview

Ctrl+I

Assistant

Responses are generated using AI and may contain mistakes.