Skip to main content
POST
/
account-updater
/
jobs
Create Account Updater job
using RestSharp;


var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/account-updater/jobs");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n  \"payment_method_ids\": [\n    \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n  ]\n}", false);
var response = await client.PostAsync(request);

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

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

func main() {

url := "https://api.sandbox.{id}.gr4vy.app/account-updater/jobs"

payload := strings.NewReader("{\n \"payment_method_ids\": [\n \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.sandbox.{id}.gr4vy.app/account-updater/jobs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payment_method_ids\": [\n \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n ]\n}")
.asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.{id}.gr4vy.app/account-updater/jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'payment_method_ids' => [
'497f6eca-6276-4993-bfeb-53cbbbba6f08'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$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/account-updater/jobs"

payload = { "payment_method_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({payment_method_ids: ['497f6eca-6276-4993-bfeb-53cbbbba6f08']})
};

fetch('https://api.sandbox.{id}.gr4vy.app/account-updater/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
curl --request POST \
--url https://api.sandbox.{id}.gr4vy.app/account-updater/jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payment_method_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}
'
{
  "type": "account-updater-job",
  "id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
  "merchant_account_id": "default",
  "created_at": "2023-07-26T19:23:00.000+00:00",
  "updated_at": "2023-07-26T19:23:00.000+00:00",
  "inquiries": [
    {
      "type": "account-updater-inquiry",
      "id": "d038f8bf-f1fd-45b3-9948-e1fbb58e8d62",
      "payment_method_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    }
  ]
}
{
"type": "error",
"code": "bad_request",
"status": 400,
"message": "Missing '****' field",
"details": [
{
"location": "body",
"type": "value_error.missing",
"pointer": "/payment_method/number",
"message": "field required"
}
]
}
{
"type": "error",
"code": "unauthorized",
"status": 401,
"message": "No valid API authentication found",
"details": []
}
This endpoint requires the payment-methods.write scope.

Authorizations

Authorization
string
header
required

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

Body

application/json

A request to create an Account Updater job.

payment_method_ids
string<uuid>[]
required

A list of unique payment method identifiers used to create the Account Updater job. A payment method will be considered only if it qualifies for an inquiry.

Required array length: 1 - 100 elements
Example:
["497f6eca-6276-4993-bfeb-53cbbbba6f08"]

Response

Returns the created Account Updater job.

An Account Updater job.

type
enum<string>

The type of this resource. Is always account-updater-job.

Available options:
account-updater-job
Example:

"account-updater-job"

id
string<uuid>

The unique identifier for this Account Updater job.

Example:

"fe26475d-ec3e-4884-9553-f7356683f7f9"

merchant_account_id
string

The unique ID for a merchant account.

Example:

"default"

created_at
string<date-time>

The date and time when this Account Updater job was created.

Example:

"2023-07-26T19:23:00.000+00:00"

updated_at
string<date-time>

The date and time when this Account Updater job was last updated.

Example:

"2023-07-26T19:23:00.000+00:00"

inquiries
Account Updater Inquiry Summary · object[]

A list of inquiries associated with this Account Updater job.