PUT
/
gift-card-services
/
{gift_card_service_id}
curl --request PUT \
  --url https://api.{gr4vy_id}.gr4vy.app/gift-card-services/{gift_card_service_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "display_name": "Qwikcilver UK",
  "fields": [
    {
      "key": "private_key",
      "value": "pk_26PHem9AhJZvU623DfE1x4sd"
    }
  ],
  "active": true
}'
{
  "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"
}

This endpoint requires the gift-card-services.write 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
required

The unique ID of the gift card service.

Example:

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

Body

application/json

Request body for updating a gift card service.

display_name
string

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

Required string length: 1 - 50
Example:

"Qwikcilver UK"

fields
object[]

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

A key-value pair that represents a field defined in the definition for this gift card service.

active
boolean

Defines if this service is currently active or not.

Example:

true

Response

201
application/json
Returns the updated 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

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

The date and time when this service was created.

Example:

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

updated_at
string

The date and time when this service was last updated.

Example:

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