Update billing address from the guest profile
Purpose: Use this API to update the billing address of the guest from the guest profile while saving a new card.
You must provide a unique identifier for the guest_id and the account_id.
Before you begin
- You need a valid API key or access token. See Set up API authentication.
Permission: Manage API Keys (on the Administrator security object) — Required to access Zenoti APIs.
Endpoint
PUT /v1/guests/{guest_id}/accounts/{account_id}/billing_address
Base URL: https://api.zenoti.com
Request
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | bearer {{access_token}} |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| guest_id | string | Yes | Unique 32 digit identifier of the guest. |
| account_id | string | Yes | Unique 32 digit identifier of the guest's saved card/payment account. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| center_id | string | No | Unique identifier of the center. |
| processor_id | string | No | Name of the processor associated with the center. |
| billing_address | object | No | Address of the guest that must be updated. |
Response
Success (200 OK)
{}
Example
curl --request PUT \
--url 'https://api.zenoti.com/v1/guests/{guest_id}/accounts/{account_id}/billing_address' \
--header 'Authorization: bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
"center_id": "string",
"processor_id": "string",
"billing_address": {}
}'
const response = await fetch('https://api.zenoti.com/v1/guests/{guest_id}/accounts/{account_id}/billing_address', {
method: 'PUT',
headers: {
'Authorization': 'bearer {{access_token}}',
'Content-Type': 'application/json'
},
body: JSON.stringify({
center_id: 'string',
processor_id: 'string',
billing_address: {}
})
});
const data = await response.json();
import requests
response = requests.put(
'https://api.zenoti.com/v1/guests/{guest_id}/accounts/{account_id}/billing_address',
headers={
'Authorization': 'bearer {{access_token}}',
},
json={'center_id': 'string', 'processor_id': 'string', 'billing_address': {}}
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var content = new StringContent(
JsonSerializer.Serialize(new {
center_id = "string",
processor_id = "string",
billing_address = new { }
}),
Encoding.UTF8, "application/json");
var response = await client.PutAsync(
"https://api.zenoti.com/v1/guests/{guest_id}/accounts/{account_id}/billing_address", content);
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'
uri = URI('https://api.zenoti.com/v1/guests/{guest_id}/accounts/{account_id}/billing_address')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Put.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
request['Content-Type'] = 'application/json'
request.body = { center_id: 'string', processor_id: 'string', billing_address: {} }.to_json
response = http.request(request)
data = JSON.parse(response.body)
Error codes
| Status | Description |
|---|---|
| 400 | 400 |
| 401 | Unauthorized -- invalid or expired access token |
| 429 | Too many requests -- rate limit exceeded |