POST
/
buyers
/
{buyer_id}
/
shipping-details
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.CreateAsync(
    buyerId: "fe26475d-ec3e-4884-9553-f7356683f7f9",
    shippingDetailsCreate: new ShippingDetailsCreate() {}
);

// 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
required

The ID of the buyer to add shipping details to.

Examples:

"fe26475d-ec3e-4884-9553-f7356683f7f9"

Body

application/json

Response

201
application/json

Successful Response

The response is of type object.