Skip to content
agovena.
agovena.
Get started
Community

API overview

Replace the saved address fields

Choose an operation to see its request, response shape, access rules and implementation source.

WriteAuthenticated

PATCH/api/v1/addresses/{address}

Replace the saved address fields

Sanctum session or bearer token. Required bearer ability: addresses.update

Request
FieldInRule
addressPath parameterRequired numeric ID owned by the authenticated customer. Foreign and missing IDs return 404.
name, line1JSON bodyRequired strings; max 255 characters each.
cityJSON bodyRequired string; max 120.
postal_codeJSON bodyRequired string; max 20.
countryJSON bodyRequired string; exactly 2 characters.
labelJSON bodyNullable string; max 80.
company, line2JSON bodyNullable strings; max 255 each.
regionJSON bodyNullable string; max 120.
phoneJSON bodyNullable string; max 40.
is_default_billing, is_default_shippingJSON bodyOptional booleans; omitted flags become false, including on PATCH.
propertiesJSON bodyNullable array. Supported aliases and precedence: see the address schema below.
cURL
curl --request PATCH "https://shop.example.test/api/v1/addresses/$ADDRESS_ID" \
  --header 'Accept: application/json' \
  --header "Authorization: Bearer $API_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{"name":"Alex Example","line1":"Example Street 1","city":"Brussels","postal_code":"1000","country":"BE"}'
Response200
Success: 200

Response shape (notation, not a captured response)

schema
{ data: Address }

Full response schema

Common errors
HTTP statusMeaning
401unauthenticated: missing or invalid authentication.
403unauthorized, insufficient_scope or ip_not_allowed: check account context, required ability and token IP policy.
404not_found: missing, inactive or foreign-owned resource.
422validation_error: invalid input or unmet domain requirements. Payment initiation can also return payment_failed.
429rate_limited: back off before retrying, especially writes.
Error envelope and global caveats

Search documentation

Search guides, commands and API endpoints

What are you looking for?

Documentation