> ## 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.

# Check credits eligibility by order ID

> In case of refund scenarios, credits such as gift card may be offered to customers for various reasons such as damaged products, later deliveries, or other qualifying factors as per your policy. <p> This endpoint checks the credits eligibility by order ID, allowing businesses to manage credits effectively and provide appropriate compensation to eligible customers.</p>



## OpenAPI

````yaml orders.openapi post /orders/{orderId}/actions/check-credits-eligibility
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/{orderId}/actions/check-credits-eligibility:
    post:
      tags:
        - Credits
      summary: Check credits eligibility by order ID
      description: >-
        In case of refund scenarios, credits such as gift card may be offered to
        customers for various reasons such as damaged products, later
        deliveries, or other qualifying factors as per your policy. <p> This
        endpoint checks the credits eligibility by order ID, allowing businesses
        to manage credits effectively and provide appropriate compensation to
        eligible customers.</p>
      operationId: getCreditsEligibility
      parameters:
        - description: >-
            24-character system-generated order ID returned in the response of
            Create Order - `POST /orders` endpoint.
          example: 5349b4ddd2781d08c09890f4
          in: path
          name: orderId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xFabricRequestId'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/creditsEligibilityResponse'
          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:
    creditsEligibilityResponse:
      description: Credits eligibility model
      properties:
        description:
          description: Description provided while requesting credits (for reference)
          example: Policy used to add credits
          type: string
        eligibleReasonCodes:
          description: Reason codes to support credits request
          items:
            $ref: '#/components/schemas/reasonCodeAndDescription'
          type: array
        orderId:
          description: 24-character system-generated order ID
          example: 62f3982438bcab1951be0a19
          type: string
        policyName:
          description: Merchant-given policy name.
          example: Credits policy
          type: string
        policyType:
          description: Policy type used to check credits eligibility
          example: credits
          type: string
      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
    reasonCodeAndDescription:
      description: Return or exchange reason
      properties:
        code:
          description: >-
            Reason code for return, cancellation, or exchange. Values are
            configurable as per requirement.
          example: 1DMG
          type: string
        description:
          description: Brief description for the return `code`
          example: Damaged
          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

````