PUT
/
buyers
/
{buyer_id}
/
shipping-details
/
{shipping_details_id}
C#
using Gr4vy;
using Gr4vy.Models.Components;

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

var res = await sdk.Buyers.ShippingDetails.UpdateAsync(
    buyerId: "fe26475d-ec3e-4884-9553-f7356683f7f9",
    shippingDetailsId: "bf8c36ad-02d9-4904-b0f9-a230b149e341",
    shippingDetailsUpdate: new ShippingDetailsUpdate() {}
);

// handle response
{
  "first_name": "John",
  "last_name": "Doe",
  "email_address": "john@example.com",
  "phone_number": "+1234567890",
  "address": {
    "city": "San Jose",
    "country": "US",
    "postal_code": "94560",
    "state": "California",
    "state_code": "US-CA",
    "house_number_or_name": "10",
    "line1": "Stafford Appartments",
    "line2": "29th Street",
    "organization": "Gr4vy"
  },
  "id": "bf8c36ad-02d9-4904-b0f9-a230b149e341",
  "buyer_id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
  "type": "shipping-details"
}
This endpoint requires the buyers.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"

Path Parameters

buyer_id
string<uuid>
required

The ID of the buyer to update shipping details for.

Examples:

"fe26475d-ec3e-4884-9553-f7356683f7f9"

shipping_details_id
string<uuid>
required

The ID of the shipping details to update.

Examples:

"bf8c36ad-02d9-4904-b0f9-a230b149e341"

Body

application/json
first_name
string | null

The first name(s) or given name for the buyer.

Required string length: 1 - 255
Examples:

"John"

last_name
string | null

The last name, or family name, of the buyer.

Required string length: 1 - 255
Examples:

"Doe"

email_address
string | null

The email address for the buyer.

Required string length: 1 - 320
Examples:

"john@example.com"

phone_number
string | null

The phone number for the buyer which should be formatted according to the E164 number standard.

Examples:

"+14155552671"

"+442071838750"

address
object | null

The billing address for the buyer.

Response

Successful Response

first_name
string | null

The first name(s) or given name for the buyer.

Required string length: 1 - 255
Examples:

"John"

last_name
string | null

The last name, or family name, of the buyer.

Required string length: 1 - 255
Examples:

"Doe"

email_address
string | null

The email address for the buyer.

Required string length: 1 - 320
Examples:

"john@example.com"

phone_number
string | null

The phone number for the buyer which should be formatted according to the E164 number standard.

Examples:

"+14155552671"

"+442071838750"

address
object | null

The billing address for the buyer.

id
string<uuid> | null

The ID for the shipping details.

Examples:

"bf8c36ad-02d9-4904-b0f9-a230b149e341"

buyer_id
string<uuid> | null

The ID for the buyer.

Examples:

"fe26475d-ec3e-4884-9553-f7356683f7f9"

type
string
default:shipping-details

Always shipping-details.

Allowed value: "shipping-details"
Examples:

"shipping-details"