POST
/
orders
/
{orderId}
/
actions
/
update-credit-status

Authorizations

Authorization
string
headerrequired

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

orderId
string
required

24-character system-generated order ID returned in the response of Create Order - POST /orders endpoint.

Body

application/json

Request to update credits details

attributes
object

Merchant-defined custom attributes. This is a placeholder for additional info (in key: value pairs).

creditId
string
required

Unique UUID of credit

note
string

Placeholder for additional information, if any.

statusCode
enum<string>
required

Credit status

Available options:
PENDING,
CONFIRMED,
FAILED,
CANCELED

Response

200 - application/json

Credit response

amount
number
required

Credits amount

attributes
object

Merchant-defined custom attributes. This is a placeholder for additional info in key: value pairs

createdAt
string

Credits creation time, in UTC format

creditId
string

Unique UUID of credit

currency
string
required

Three-letter currency code as defined by ISO-4217

employeeId
string

Employee (ID or name) who initiated a the credits request

note
string

Note

paymentCounter
integer

A sequential or incremental counter associated with a payment for an order. Applicable in refund scenarios to identify the specific payment for refund.

policyCode
string

Merchant-defined policy code, varies from merchant to merchant. If omitted, the default policy is used.

reasonCode
string
required

Reason code

source
string
required

Source of credits request

statusCode
enum<string>

Credit status

Available options:
PENDING,
CONFIRMED,
FAILED,
CANCELED
subReasonCode
string

Subreason code

type
enum<string>
required

Credit type. Currently, supports only Gift Card

Available options:
GIFT_CARD
updatedAt
string

Time of last update to credits, in UTC format.