Skip to main content
GET
/
gift-card-services
/
{gift_card_service_id}
Get gift card service
using RestSharp;


var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/gift-card-services/{gift_card_service_id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);
package main

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

func main() {

	url := "https://api.sandbox.{id}.gr4vy.app/gift-card-services/{gift_card_service_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(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.sandbox.{id}.gr4vy.app/gift-card-services/{gift_card_service_id}")
  .header("Authorization", "Bearer <token>")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.sandbox.{id}.gr4vy.app/gift-card-services/{gift_card_service_id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.sandbox.{id}.gr4vy.app/gift-card-services/{gift_card_service_id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.sandbox.{id}.gr4vy.app/gift-card-services/{gift_card_service_id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
curl --request GET \
  --url https://api.sandbox.{id}.gr4vy.app/gift-card-services/{gift_card_service_id} \
  --header 'Authorization: Bearer <token>'
{
  "type": "gift-card-service",
  "id": "6c020bf3-179b-4f4f-858d-84e39e196e0f",
  "merchant_account_id": "default",
  "gift_card_service_definition_id": "qwikcilver-gift-card",
  "display_name": "Qwikcilver UK",
  "active": true,
  "fields": [
    {
      "key": "secret_key",
      "value": "sk_test_26PHem9AhJZvU623DfE1x4sd"
    }
  ],
  "created_at": "2012-12-12T10:53:43+00:00",
  "updated_at": "2012-12-12T10:53:43+00:00"
}
{
  "type": "error",
  "code": "unauthorized",
  "status": 401,
  "message": "No valid API authentication found",
  "details": []
}
{
  "type": "error",
  "code": "not_found",
  "status": 404,
  "message": "The resource could not be found",
  "details": []
}
This endpoint requires the gift-card-services.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_id
string<uuid>
required

The unique ID of the gift card service.

Example:

"541b126f-44c5-4c5e-a06b-d0e0d54c7d3f"

Response

Returns a gift card service.

An configured gift card service.

type
enum<string>

The type of this resource.

Available options:
gift-card-service
Example:

"gift-card-service"

id
string<uuid>

The ID of this gift card service.

Example:

"6c020bf3-179b-4f4f-858d-84e39e196e0f"

merchant_account_id
string

The unique ID for a merchant account.

Example:

"default"

gift_card_service_definition_id
string

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

Required string length: 1 - 50
Example:

"qwikcilver-gift-card"

display_name
string

The custom name set for this service.

Required string length: 1 - 200
Example:

"Qwikcilver UK"

active
boolean

Defines if this service is currently active or not.

Example:

true

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.

created_at
string<date-time>

The date and time when this service was created.

Example:

"2012-12-12T10:53:43+00:00"

updated_at
string<date-time>

The date and time when this service was last updated.

Example:

"2012-12-12T10:53:43+00:00"