GET
/
gift-card-service-definitions
/
{gift_card_service_definition_id}
Get gift card service definition
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sandbox.{id}.gr4vy.app/gift-card-service-definitions/{gift_card_service_definition_id}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
{
  "id": "qwikcilver-gift-card",
  "type": "gift-card-service-definition",
  "display_name": "Stripe",
  "fields": [
    {
      "key": "private_api_key",
      "display_name": "Private API key",
      "required": true,
      "format": "text",
      "secret": true
    }
  ],
  "icon_url": "https://cdn.gr4vy.app/stripe.svg"
}
This endpoint requires the gift-card-service-definitions.read scope.

Authorizations

Authorization
string
header
required

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

Path Parameters

gift_card_service_definition_id
string
required

The unique ID of the gift card service definition.

Example:

"qwikcilver-gift-card"

Response

Returns a gift card service definition.

An available gift card service that can be configured.

id
string

The ID of the gift card service definition.

Example:

"qwikcilver-gift-card"

type
enum<string>
default:gift-card-service-definition

gift-card-service-definition.

Available options:
gift-card-service-definition
Example:

"gift-card-service-definition"

display_name
string

The display name of this service.

Example:

"Stripe"

fields
object[]

A list of fields that need to be submitted when activating the payment. service.

Minimum length: 1
icon_url
string

An icon to display for the payment service.

Example:

"https://cdn.gr4vy.app/stripe.svg"