Skip to main content
POST
C#
This endpoint requires the gift-cards.write scope.

Authorizations

Authorization
string
header
required

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

Headers

x-gr4vy-merchant-account-id
string | null

The ID of the merchant account to use for this request.

Example:

"default"

Body

application/json
number
string
required

The 16-19 digit number for the gift card.

Required string length: 16 - 19
Pattern: ^\d+$
Example:

"4123455541234561234"

pin
string
required

The PIN for this gift card.

Minimum string length: 1
Example:

"1234"

buyer_id
string<uuid> | null

The ID of the buyer to associate this gift card to. If this field is provided then the buyer_external_identifier field needs to be unset.

Example:

"fe26475d-ec3e-4884-9553-f7356683f7f9"

buyer_external_identifier
string | null

The external_identifier of the buyer to associate this gift card to. If this field is provided then the buyer_id field needs to be unset.

Required string length: 1 - 200
Example:

"buyer-12345"

Response

Successful Response

id
string<uuid>
required

The ID for the gift card.

Example:

"356d56e5-fe16-42ae-97ee-8d55d846ae2e"

merchant_account_id
string
required

The ID of the merchant account this buyer belongs to.

Example:

"default"

gift_card_service
GiftCardService · object
required

The service this gift card belongs to.

bin
string
required

The first 6 digits of the full gift card number.

Example:

"412345"

sub_bin
string
required

The 3 digits after the bin of the full gift card number.

Example:

"554"

last4
string
required

The last 4 digits for the gift card.

Example:

"1234"

created_at
string<date-time>
required

The date this gift card record was created at.

Example:

"2013-07-16T19:23:00.000+00:00"

updated_at
string<date-time>
required

The date this gift card record was last updated at.

Example:

"2013-07-16T19:23:00.000+00:00"

usage_count
integer
required

The number of times this gift card has been used in transactions.

Example:

100

cit_usage_count
integer
required

The number of times this gift card has been used in transactions for client initiated transactions.

Example:

50

type
string
default:gift-card

Always gift-card.

Allowed value: "gift-card"
Example:

"gift-card"

expiration_date
string<date-time> | null

The date and time when this gift card expires. This is a full date/time and may be more accurate than the actual expiry date received by the gift card service.

Example:

"2013-07-16T19:23:00.000+00:00"

buyer
Buyer · object | null

The buyer for which this gift card is stored.

last_used_at
string<date-time> | null

The timestamp when this gift card was last used in a transaction.

Example:

"2013-07-16T19:23:00.000+00:00"

cit_last_used_at
string<date-time> | null

The timestamp when this gift card was last used in a transaction for client initiated transactions.

Example:

"2013-07-16T19:23:00.000+00:00"