POST
/
orders
/
order-number
/
{orderNumber}
/
actions
/
create-credits
curl --request POST \
  --url https://api.fabric.inc/v3/orders/order-number/{orderNumber}/actions/create-credits \
  --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 '{
  "credits": [
    {
      "amount": 21.5,
      "attributes": {
        "giftCardNumber": "XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ"
      },
      "currency": "USD",
      "employeeId": "12312232",
      "note": "Credit request initiated",
      "paymentCounter": 1,
      "policyCode": "RC1",
      "reasonCode": "EC",
      "source": "CSR",
      "subReasonCode": "ACC",
      "type": "GIFT_CARD"
    }
  ]
}'
{
  "credits": [
    {
      "amount": 21.5,
      "attributes": {
        "giftCardNumber": "XlQZTmFDFtPFGMxJP6oiAqN3vo+qKZ"
      },
      "createdAt": "2022-07-11T15:03:14.642Z",
      "creditId": "a05b72dc-78d8-4ea4-90fc-2fe6a1fe1111",
      "currency": "USD",
      "employeeId": "12312232",
      "note": "Credit request initiated",
      "paymentCounter": 1,
      "policyCode": "RC1",
      "reasonCode": "EC",
      "source": "CSR",
      "statusCode": "PENDING",
      "subReasonCode": "ACC",
      "type": "GIFT_CARD",
      "updatedAt": "2022-07-11T15:03:14.642Z"
    }
  ]
}

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

The merchant-defined order identifier provided during the Create Order - POST /orders endpoint.

Body

application/json

Credits request

credits
object[]
required

Response

200
application/json
OK

Credits response

credits
object[]