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

Base URL

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://development-api.shoutaboutus.com

Endpoint

GET /api/v1/billing-address/get

Authentication

Partner or Account token

  • user_id must be a user inside your own account tree; otherwise 422.

Rate limit

This endpoint has no rate limit.

Request parameters

ParameterInTypeRequiredDescription
user_idqueryintegerYesThe 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.

FieldTypeDescription
idintegerThe billing address id.
user_idintegerThe user the address belongs to.
city_idintegerThe city id.
namestring or nullThe user's name, saved with the address.
billing_emailstringBilling email address.
mobilestring or nullBilling phone number.
zipcodestringPostal code.
billing_addressstringStreet address.
companystringCompany name on the bill.
cityobjectThe city: id, name, state_id.
city.stateobjectThe state: id, name, country_id.
city.state.countryobjectThe 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."
    ]
  }
}
StatusMeaning
200The address, or null when none is saved.
401The token is missing, expired or invalid.
422user_id is missing, doesn't exist, or is outside your tree.
500Unexpected 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'

Did this page help you?