GET

/flows/{flow}/actions/{action}/rules/{rule_id}

curl --request GET \
  --url https://api.sandbox.{gr4vy_id}.gr4vy.app/flows/{flow}/actions/{action}/rules/{rule_id} \
  --header 'Authorization: <authorization>'
{
  "action": "select-payment-options",
  "conditions": [],
  "created_at": "2013-07-16T19:23:00.000+00:00",
  "description": "example rule.",
  "flow": "checkout",
  "id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
  "merchant_account_id": "default",
  "position": "2",
  "type": "rule",
  "updated_at": "2013-07-16T19:23:00.000+00:00"
}

This endpoint requires the flows.read scope.

Authorizations

Authorizationheaderrequired
string

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

Path Parameters

flowrequired
enum<string>

The flow name. This can be one of the following.

  • checkout - Applies during checkout to determine what payment options are shown.
  • card-transaction - Applies when processing a card transaction.
  • redirect-transaction - Applies when processing any other transaction.
Available options:
checkout,
card-transaction,
redirect-transaction
actionrequired
enum<string>

The flow action.

Available options:
select-payment-options,
decline-early,
route-transaction,
skip-3ds
rule_idrequired
string

The unique ID for a rule.

Response

200 - application/json
action
enum<string>

Action for the given rule. Actions can only be used in flows that support them.

  • The checkout flow only supports the select-payment-options action.
  • The card-transaction currently supports the route-transaction, skip-3ds, and decline-early actions.
  • The redirect-transaction flow currently only supports the route-transaction action.
Available options:
select-payment-options,
decline-early,
route-transaction,
skip-3ds
conditions
object[]

One or more conditions that apply for this rule. Each condition needs to match for this rule to go into effect.

created_at
string

The date and time when this buyer was created in our system.

description
string | null

Description of the flow rule.

flow
enum<string>

The name of the Flow.

Available options:
checkout,
card-transaction,
redirect-transaction
id
string

The unique Gr4vy ID for this rule.

merchant_account_id
string

The unique ID for a merchant account.

outcome
object

Defines the outcome of a rule in a flow where the result is a list of UUIDs for a service.

position
number

The position of the rule in the flow.

type
enum<string>

The type of this resource. Is always rule.

Available options:
rule
updated_at
string

The date and time when this buyer was last updated in our system.