POST
/
account-updater
/
jobs
C#
using Gr4vy;
using Gr4vy.Models.Components;
using System.Collections.Generic;

var sdk = new Gr4vySDK(
    id: "example",
    server: SDKConfig.Server.Sandbox,
    bearerAuthSource: Auth.WithToken(privateKey),
    merchantAccountId: "default"
);

var res = await sdk.AccountUpdater.Jobs.CreateAsync(accountUpdaterJobCreate: new AccountUpdaterJobCreate() {
    PaymentMethodIds = new List<string>() {
        "ef9496d8-53a5-4aad-8ca2-00eb68334389",
        "f29e886e-93cc-4714-b4a3-12b7a718e595",
    },
});

// handle response
{
  "type": "account-updater-job",
  "id": "cc18c7c6-c1d4-4194-92a7-d5a985108b68",
  "merchant_account_id": "default",
  "inquiries": [
    {
      "type": "account-updater-inquiry",
      "id": "aadb3ea8-5ad6-408b-8c3d-82da77c8d619",
      "payment_method_id": "ef9496d8-53a5-4aad-8ca2-00eb68334389"
    }
  ],
  "created_at": "2013-07-16T19:23:00.000+00:00",
  "updated_at": "2013-07-16T19:23:00.000+00:00"
}
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.

Headers

x-gr4vy-merchant-account-id
string | null

The ID of the merchant account to use for this request.

Examples:

"default"

Body

application/json
payment_method_ids
string<uuid>[]
required

A list of payment method IDs to request an update for.

Required array length: 1 - 100 elements
Examples:
[
"ef9496d8-53a5-4aad-8ca2-00eb68334389",
"f29e886e-93cc-4714-b4a3-12b7a718e595"
]

Response

A scheduled account updater job when one or more payment methods were scheduled for update.

id
string<uuid>
required

The ID for the account updater job.

Examples:

"cc18c7c6-c1d4-4194-92a7-d5a985108b68"

merchant_account_id
string
required

The ID of the merchant account this job belongs to.

Examples:

"default"

inquiries
AccountUpdaterInquirySummary · object[]
required

A list of the payment methods that have been scheduled for an update.

created_at
string<date-time>
required

The date and time when this payment method was first created in our system.

Examples:

"2013-07-16T19:23:00.000+00:00"

updated_at
string<date-time>
required

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

Examples:

"2013-07-16T19:23:00.000+00:00"

type
string
default:account-updater-job

Always account-updater-job

Allowed value: "account-updater-job"
Examples:

"account-updater-job"