Get the billing address
Overview
See the billing address on file.
Use this to show or confirm it.
You'll need a token.
Returns the address, or null when none is saved. When the user's company is billed to its partner or its account, the address returned is the company owner's.
Prerequisites
- A bearer token. See Authentication.
- The user's id (
user_id), from List users.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
GET /api/v1/billing-address/get
Authentication
Partner or Account token
user_idmust be a user inside your own account tree; otherwise422.
Rate limit
This endpoint has no rate limit.
Request parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id | query | integer | Yes | The user whose billing address to get. Must exist and be inside your account tree. |
Request body
None.
Request payload
None.
Response body
The payload is inside data. data is null when no address is saved.
| Field | Type | Description |
|---|---|---|
id | integer | The billing address id. |
user_id | integer | The user the address belongs to. |
city_id | integer | The city id. |
name | string or null | The user's name, saved with the address. |
billing_email | string | Billing email address. |
mobile | string or null | Billing phone number. |
zipcode | string | Postal code. |
billing_address | string | Street address. |
company | string | Company name on the bill. |
city | object | The city: id, name, state_id. |
city.state | object | The state: id, name, country_id. |
city.state.country | object | The country: id, name. |
Response payload
{
"data": {
"id": 1,
"user_id": 3011,
"city_id": 456,
"name": "Jane Smith",
"billing_email": "[email protected]",
"mobile": "+15555550100",
"zipcode": "12345",
"billing_address": "123 Example St",
"company": "Example Corp",
"city": {
"id": 456,
"name": "Megarine",
"state_id": 4902,
"state": {
"id": 4902,
"name": "Sidi Bel Abbès",
"country_id": 4,
"country": {
"id": 4,
"name": "Algeria"
}
}
}
}
}Examples
Success payload
No address saved:
{
"data": null
}Error payload
422 User outside your tree
{
"message": "The selected user id does not belong to your company hierarchy.",
"errors": {
"user_id": [
"The selected user id does not belong to your company hierarchy."
]
}
}422 user_id missing
{
"message": "The user id field is required.",
"errors": {
"user_id": [
"The user id field is required."
]
}
}| Status | Meaning |
|---|---|
200 | The address, or null when none is saved. |
401 | The token is missing, expired or invalid. |
422 | user_id is missing, doesn't exist, or is outside your tree. |
500 | Unexpected server error. |
Example request
curl --request GET \
--url "https://production-api.shoutaboutus.com/api/v1/billing-address/get?user_id=3011" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json'Updated 17 days ago
Did this page help you?
