POST
/
gift-card-services
curl --request POST \
  --url https://api.{gr4vy_id}.gr4vy.app/gift-card-services \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "active": true,
  "display_name": "Qwikcilver UK",
  "fields": [
    {
      "key": "private_key",
      "value": "pk_26PHem9AhJZvU623DfE1x4sd"
    }
  ],
  "gift_card_service_definition_id": "qwikcilver-gift-card"
}'
{
  "active": true,
  "created_at": "2012-12-12T10:53:43+00:00",
  "display_name": "Qwikcilver UK",
  "fields": [
    {
      "key": "secret_key",
      "value": "sk_test_26PHem9AhJZvU623DfE1x4sd"
    }
  ],
  "gift_card_service_definition_id": "qwikcilver-gift-card",
  "id": "6c020bf3-179b-4f4f-858d-84e39e196e0f",
  "merchant_account_id": "default",
  "type": "gift-card-service",
  "updated_at": "2012-12-12T10:53:43+00:00"
}

This endpoint requires the gift-card-services.write scope.

This feature is in limited release and not yet available in all environments.

Authorizations

Authorization
string
headerrequired

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

Body

application/json
active
boolean
default: true

Defines if this service is currently active or not.

display_name
string
required

A custom name for the service. This will be shown in the Admin UI.

fields
object[]
required

A list of fields, each containing a key-value pair for each field defined by the definition for this gift card service.

gift_card_service_definition_id
string
required

The ID of the gift card service to use.

Response

201 - application/json
active
boolean

Defines if this service is currently active or not.

created_at
string

The date and time when this service was created.

display_name
string

The custom name set for this service.

fields
object[]

A list of fields, each containing a key-value pair for each field configured for this gift card service. Fields marked as secret are not returned.

gift_card_service_definition_id
string

The ID of the gift card service definition used to create this service.

id
string

The ID of this gift card service.

merchant_account_id
string

The unique ID for a merchant account.

type
enum<string>

The type of this resource.

Available options:
gift-card-service
updated_at
string

The date and time when this service was last updated.