List flow rules
using RestSharp;
var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/flows/{flow}");
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/flows/{flow}"
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/flows/{flow}")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.{id}.gr4vy.app/flows/{flow}",
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/flows/{flow}"
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/flows/{flow}', 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/flows/{flow} \
--header 'Authorization: Bearer <token>'{
"items": [
{
"type": "rule",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"merchant_account_id": "default",
"description": "example rule.",
"flow": "checkout",
"action": "select-payment-options",
"conditions": [
{
"name": "amount",
"operator": "less_than",
"value": {
"Amount condition value": {
"value": {
"description": "example amount value.",
"currency": "USD",
"value": 100
}
}
}
}
],
"outcome": {
"type": "card-routing",
"result": [
{
"payment_service_id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"instrument\"": "network_token",
"transformations": []
},
{
"payment_service_id": "d88aca32-07fb-46cd-a43f-86da02b73c21",
"instrument": "pan",
"transformations": [
{
"name": "force_mit"
}
]
}
],
"version": 2
},
"position": 2,
"created_at": "2013-07-16T19:23:00.000+00:00",
"updated_at": "2013-07-16T19:23:00.000+00:00",
"error_code": "flow_error_code"
}
]
}{
"type": "error",
"code": "unauthorized",
"status": 401,
"message": "No valid API authentication found",
"details": []
}Returns a list of rules for a given flow. Each rule has an associated action, conditions, and outcome.
GET
/
flows
/
{flow}
List flow rules
using RestSharp;
var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/flows/{flow}");
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/flows/{flow}"
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/flows/{flow}")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.{id}.gr4vy.app/flows/{flow}",
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/flows/{flow}"
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/flows/{flow}', 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/flows/{flow} \
--header 'Authorization: Bearer <token>'{
"items": [
{
"type": "rule",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"merchant_account_id": "default",
"description": "example rule.",
"flow": "checkout",
"action": "select-payment-options",
"conditions": [
{
"name": "amount",
"operator": "less_than",
"value": {
"Amount condition value": {
"value": {
"description": "example amount value.",
"currency": "USD",
"value": 100
}
}
}
}
],
"outcome": {
"type": "card-routing",
"result": [
{
"payment_service_id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"instrument\"": "network_token",
"transformations": []
},
{
"payment_service_id": "d88aca32-07fb-46cd-a43f-86da02b73c21",
"instrument": "pan",
"transformations": [
{
"name": "force_mit"
}
]
}
],
"version": 2
},
"position": 2,
"created_at": "2013-07-16T19:23:00.000+00:00",
"updated_at": "2013-07-16T19:23:00.000+00:00",
"error_code": "flow_error_code"
}
]
}{
"type": "error",
"code": "unauthorized",
"status": 401,
"message": "No valid API authentication found",
"details": []
}This endpoint requires the
flows.read scope.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
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.non-card-transaction- Applies when processing a gift card only transaction, or a redirect transaction using thedecline-earlyaction.redirect-transaction- Applies when processing any other transaction. The name of the Flow.
Available options:
checkout, card-transaction, non-card-transaction, redirect-transaction Example:
"checkout"
Response
Returns a list of rules.
A list of rule in a flow.
A list of rules.
Show child attributes
Show child attributes
⌘I