> ## Documentation Index
> Fetch the complete documentation index at: https://developer.fabric.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Create appeasement by order number

> When customer is dissatisfied with their shopping experience, you may want to offer an appeasement amount to keep them happy. <p> This endpoint is used to create appeasement request by order number.</p> <p> **Note**: If you do not have an order number, use the corresponding order ID-based endpoint - `POST /orders/{orderId}/actions/create-appeasement`</p>



## OpenAPI

````yaml orders.openapi post /orders/order-number/{orderNumber}/actions/create-appeasement
openapi: 3.0.1
info:
  contact:
    email: support@fabric.inc
    name: fabric Support Team
  description: >-
    fabric **Orders** API is a scalable multi-tenant service designed to
    streamline your order management process. Orders API is a REST and JSON
    driven interface enabling retailers to create orders directly from online
    Storefronts and Point-of-Sale systems, and serve as records of purchase
    transactions to permit retailers to operate against a standard schema with
    varied purchase channels. <p> fabric Orders API creates orders real time in
    the orders database, unifying the order data for users to streamline order
    lifecycle orchestration and customer service operations. It offers a range
    of features including the ability to create orders, get orders, update
    pickup details, and track orders, as well as search for existing orders.
    Also, the Orders API makes it easy to check eligibility of return, cancel,
    and exchange requests as well process them, if eligible. In addition, you
    can flag fraudulent orders based on due diligence, and either release them
    from hold or cancel them altogether. The appeasement feature helps you
    resolve any issues that may arise with an order and keep your customers
    happy. </p>
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
  termsOfService: https://fabric.inc/terms-of-use
  title: fabric Orders API
  version: 3.0.0
  x-audience: external-public
servers:
  - description: Production
    url: https://api.fabric.inc/v3
security:
  - authorization: []
tags:
  - description: These endpoints authorize order payments.
    name: Payments
  - description: These endpoints help create appeasement requests.
    name: Appeasements
  - description: >-
      Credits are refunds to customers, often in the form of gift cards or
      credit notes, when customers have made payments with cash or a card that
      has subsequently expired. Credits are provided during order returns and
      appeasements. Use these endpoints to create and manage credits.
    name: Credits
  - description: >-
      These endpoints check eligibility of order cancellation requests and if
      eligible, processes order cancellation.
    name: Cancellations
  - description: These endpoints track orders.
    name: Tracking
  - description: >-
      These endpoints create orders, update pickup details (for BOPIS scenarios)
      and get order details.
    name: Orders
  - description: >-
      These endpoints check eligibility of order return or exchanges requests
      and, if eligible, processes order return or exchanges.
    name: Returns
  - description: These endpoints deal with potential fraud orders.
    name: Frauds
externalDocs:
  description: Find out more about fabric Orders (also called OMS)
  url: https://developer.fabric.inc/v3/docs/orders-overview
paths:
  /orders/order-number/{orderNumber}/actions/create-appeasement:
    post:
      tags:
        - Appeasements
      summary: Create appeasement by order number
      description: >-
        When customer is dissatisfied with their shopping experience, you may
        want to offer an appeasement amount to keep them happy. <p> This
        endpoint is used to create appeasement request by order number.</p> <p>
        **Note**: If you do not have an order number, use the corresponding
        order ID-based endpoint - `POST
        /orders/{orderId}/actions/create-appeasement`</p>
      operationId: createAppeasementByOrderNumber
      parameters:
        - description: Merchant-defined order identifier
          example: 123k4h123k
          in: path
          name: orderNumber
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xFabricRequestId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/orderCreateAppeasementRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/appeasementResponse'
          description: OK
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
        '400':
          content:
            application/json:
              example:
                errors:
                  - message: Invalid request
                    type: CLIENT_ERROR
                message: Bad request
                type: CLIENT_ERROR
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Bad request
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
        '401':
          content:
            application/json:
              example:
                message: Unauthorized request
                type: CLIENT_ERROR
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Unauthorized
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
        '404':
          content:
            application/json:
              example:
                message: Not found
                type: CLIENT_ERROR
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Not found
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
        '500':
          content:
            application/json:
              example:
                message: Internal server error
                type: SERVER_ERROR
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Internal server error
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
components:
  parameters:
    xFabricTenantId:
      description: >-
        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](/v3/platform/settings/account-details/getting-the-account-id).
        This header is required.
      example: 5f328bf0b5f328bf0b5f328b
      in: header
      name: x-fabric-tenant-id
      required: true
      schema:
        type: string
    xFabricChannelId:
      description: >-
        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.
      example: '12'
      in: header
      name: x-fabric-channel-id
      required: true
      schema:
        type: string
    xFabricRequestId:
      description: Unique request ID
      example: 263e731c-45c8-11ed-b878-0242ac120002
      in: header
      name: x-fabric-request-id
      required: false
      schema:
        type: string
  schemas:
    orderCreateAppeasementRequest:
      description: Appeasement request
      properties:
        appeasements:
          description: >-
            Order-level appeasement details. At least one order-level or
            item-level appeasement must be added.
          items:
            $ref: '#/components/schemas/orderAppeasementDetail'
          type: array
        customer:
          $ref: '#/components/schemas/invoiceCustomer'
        items:
          description: >-
            Item-level appeasements. At least one order-level or item-level
            appeasement must be added.
          items:
            $ref: '#/components/schemas/orderLineItemAppeasement'
          type: array
        orderExternalId:
          type: string
          description: >
            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
        source:
          description: >-
            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
          type: string
        userId:
          description: >-
            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'
          type: string
        requestContext:
          $ref: '#/components/schemas/requestReferenceContextResource'
          description: Request reference context information
      required:
        - source
        - userId
      type: object
    appeasementResponse:
      description: Appeasement info
      properties:
        orderNumber:
          description: >-
            Merchant-defined order identifier. If omitted, this is generated by
            fabric's sequence generator using Configuration service
          example: '12'
          type: string
        totalAmountRefunded:
          description: Total refunded amount
          example: 25.5
          format: double
          type: number
        totalAmountRefundedInCurrencies:
          description: >
            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.
          items:
            $ref: '#/components/schemas/amountInCurrency'
          type: array
      type: object
    errorResponse:
      description: Error response
      properties:
        errors:
          description: Errors
          items:
            $ref: '#/components/schemas/errorResponse'
          type: array
        message:
          description: Error message
          example: Bad request
          type: string
        type:
          description: Error type
          example: CLIENT_ERROR
          type: string
      type: object
    orderAppeasementDetail:
      description: The order appeasement details object containing appeasement details.
      properties:
        amount:
          description: >-
            Merchant-defined appeasement amount, which should not exceed
            (`charged amount` - `already refunded amount`).
          example: 34.56
          format: double
          type: number
        amountInCurrencies:
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
            description: >-
              The appeasement amount specified by the merchant, which must not
              be greater than the difference between the charged amount and any
              amounts already refunded, itemized by each currency used within
              the order.
          type: array
        appeasementCounter:
          description: >-
            Sequential or incremental counter for appeasement. Used for keeping
            track of duplicates in the request. If omitted in the request, it is
            automatically generated and will not be used to check duplicates.
            Multiple appeasement calls for the same order can cause repetition
            of appeasement counter and may cause the request to be rejected
            completely.
          example: 1
          format: int32
          type: integer
        attributes:
          description: >-
            Merchant-defined custom attributes. This is a placeholder for
            additional info in key: value pairs
          example:
            number: XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ
          type: object
        invoicedAmount:
          description: >-
            System-generated amount from Invoice service based on requested
            `amount`
          example: 34.56
          format: double
          type: number
        invoicedAmountInCurrencies:
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
            description: >-
              System-generated amount from Invoice service based on requested
              `amount` in all currencies used by an order.
          type: array
        payments:
          items:
            $ref: '#/components/schemas/orderAppeasementPaymentInfo'
          type: array
        reasonCode:
          description: >-
            Merchant-defined appeasement reason code; varies from merchant to
            merchant.
          example: Incorrect Item
          type: string
        refunds:
          items:
            $ref: '#/components/schemas/refundDetailResource'
          type: array
        source:
          description: >-
            An optional field used to determine the source that initiated the
            API request.
          example: CSR
          type: string
        subReasonCode:
          description: Subreason code for appeasement, for another layer of classification
          example: Late shipping
          type: string
      type: object
    invoiceCustomer:
      description: Invoice customer
      properties:
        accountId:
          description: >-
            Customer's loyalty account ID or external identifier that is used to
            track their loyalty program activity and rewards earned.
          example: 62272e917b12209e68751d94
          type: string
        company:
          description: Shopper's company name. This may be used for company discounts.
          example: Demo Inc
          type: string
        email:
          description: Contact person's email
          example: test@example.com
          type: string
        employeeId:
          description: Employee (ID or name) who initiated an update request
          example: 62272e917b12209e68751d94
          type: string
        name:
          $ref: '#/components/schemas/orderContactName'
        phone:
          $ref: '#/components/schemas/orderContactPhone'
        userId:
          description: >-
            Identifier of the logged in user who initiated the request. This
            could be from either fabric Identity service or an external Identity
            service.
          example: 62272e917b12209e68751d94
          type: string
      type: object
    orderLineItemAppeasement:
      description: >-
        An object broken down by the item-level containing appeasement details
        for each item.
      properties:
        appeasements:
          description: >-
            Item-level appeasements. **Note**: If the same appeasement counter
            is found twice at order level as well as item-level appeasement,
            item-level appeasement request is considered as duplicate. However,
            if the same appeasement counter is found under different items,
            then, it is not considered as duplicates.
          items:
            $ref: '#/components/schemas/orderAppeasementDetail'
          type: array
        lineItemId:
          description: >-
            Merchant-defined unique identifier for each item in an order. When
            omitted, fabric will generate it (in UUID format) during order
            creation.
          example: d538b1f1-0e45-43c6-bfc6-9666fc1188ca
          type: string
      required:
        - appeasements
        - lineItemId
      type: object
    requestReferenceContextResource:
      type: object
      description: Request reference context information
      properties:
        id:
          type: string
          description: System-generated unique identifier (UUID format)
          example: a05b72dc-78d8-4ea4-90fc-2fe6a1fe1111
        type:
          type: string
        requestId:
          type: string
          description: request id
          readOnly: true
        requestTime:
          type: string
          format: date-time
          description: System-generated order creation time
          example: '2022-04-12T09:30:31.198Z'
        attributes:
          type: object
          description: >-
            Merchant-defined custom attributes. This is a placeholder for
            additional info (in key: value pairs).
          example:
            attribute: 'N'
            someFlag: true
    amountInCurrency:
      description: Amount in currency object details.
      properties:
        amount:
          description: The amount displayed in the primary currency.
          example: 123.45
          format: double
          type: number
        currency:
          description: Currency in ISO-4217
          example: USD
          type: string
        group:
          description: >-
            A unique identifier for currencies. All calculations and invoicing
            are based on this identifier. For example, the `Shopper` group uses
            USD, while the `Retailer` group uses EUR.
          example: SHOPPER
          type: string
      required:
        - currency
        - group
      type: object
    amountInCurrencyResource:
      description: Amount in currency object details.
      properties:
        amount:
          description: The amount displayed in the primary currency.
          example: 123.45
          format: double
          type: number
        currency:
          description: Currency in ISO-4217
          example: USD
          type: string
        group:
          description: >-
            A unique identifier for currencies. All calculations and invoicing
            are based on this identifier. For example, the `Shopper` group uses
            USD, while the `Retailer` group uses EUR.
          example: SHOPPER
          type: string
      required:
        - currency
        - group
      type: object
    orderAppeasementPaymentInfo:
      description: Order appeasement payment info
      properties:
        paymentCounter:
          description: Payment counter to identify which payment to refund.
          example: 1
          format: int32
          type: integer
        refundAmount:
          description: Refund amount for appeasements.
          example: 34.56
          format: double
          type: number
        refundAmountInCurrencies:
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
            description: >-
              The refund amount specifically for appeasements, itemized by each
              currency used within the order.
          type: array
      type: object
    refundDetailResource:
      description: >-
        Used for credit rules. This resource captures the split of fees and tax
        refunds at the item and order level.
      properties:
        amount:
          description: Refund Amount
          example: '-10.'
          format: double
          type: number
        amountInCurrencies:
          items:
            $ref: '#/components/schemas/amountInCurrencyResource'
            description: >-
              The total refund amount, itemized by each currency used within the
              order.
          type: array
        name:
          description: The name of the fee or tax.
          example: Name
          type: string
        type:
          description: Type of refund
          example: ITEM
          type: string
      type: object
    orderContactName:
      description: Contact person's name
      properties:
        firstName:
          description: Contact person's first name
          example: Alex
          type: string
        lastName:
          description: Contact person's last name
          example: Doe
          type: string
        middleName:
          description: Contact person's middle name or initial
          example: E
          type: string
      type: object
    orderContactPhone:
      description: Contact person's phone details.
      properties:
        number:
          description: Contact person's phone number
          example: 123-456-7890
          type: string
        type:
          description: Contact number type
          enum:
            - MOBILE
            - HOME
            - BUSINESS
          example: MOBILE
          type: string
      type: object
  headers:
    xFabricRequestIdResponseHeader:
      description: Unique request ID
      example: 263e731c-45c8-11ed-b878-0242ac120002
      required: false
      schema:
        type: string
  securitySchemes:
    authorization:
      bearerFormat: JWT
      scheme: bearer
      type: http

````