Update an Account

put

/bcws/webresources/v1.0/accounts/general

Updates an account's properties and contact information. You can do the following:

  • Add or remove contacts
  • Change a contact's attributes, such as the name, contact type, email, address details, company name, and phone number
  • Remove optional attributes from a contact, such as the company name and phone number

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/xml ()
Root Schema : schema
Type: object
An account.
Show Source
Nested Schema : ResourceRef
Type: object
Show Source
Nested Schema : billUnit
Type: array
A bill unit.
Show Source
Nested Schema : contacts
Type: array
An account's contact information.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : Wallet
Type: object
Show Source
Nested Schema : billUnit
Type: object
A bill unit.
Show Source
Nested Schema : balanceGroups
Type: array
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : PaymentMethod
Type: object
Show Source
Nested Schema : BalanceGroup
Type: object
Show Source
Nested Schema : balances
Type: array
The list of balances associated with the balance group.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : services
Type: array
Show Source
Nested Schema : Balances
Type: object
The list of balances associated with the balance group.
Show Source
Nested Schema : subBalances
Type: array
Show Source
Nested Schema : tempCreditLimit
Type: array
Show Source
Nested Schema : SubBalances
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : TempCreditLimit
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : ServiceType
Type: object
Show Source
Nested Schema : aliasList
Type: array
The list of aliases associated with the service.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : AliasList
Type: object
The list of aliases associated with the service.
Show Source
Nested Schema : CreditCardType
Type: object
Show Source
Nested Schema : DirectDebitType
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : InvoiceType
Type: object
Show Source
Nested Schema : SepaType
Type: object
Show Source
Nested Schema : Details
Type: object
The offer details.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : contacts
Type: object
An account's contact information.
Show Source
Nested Schema : phonenumbers
Type: array
The list of associated phone numbers.
Show Source
Nested Schema : Phonenumbers
Type: object
The list of the account's phone numbers.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : paymentInstrument
Type: array
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : name
Type: object
Show Source
Nested Schema : PaymentInstrumentType
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Request Body - application/json ()
Root Schema : schema
Type: object
An account.
Show Source
Nested Schema : ResourceRef
Type: object
Show Source
Nested Schema : billUnit
Type: array
A bill unit.
Show Source
Nested Schema : contacts
Type: array
An account's contact information.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : Wallet
Type: object
Show Source
Nested Schema : billUnit
Type: object
A bill unit.
Show Source
Nested Schema : balanceGroups
Type: array
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : PaymentMethod
Type: object
Show Source
Nested Schema : BalanceGroup
Type: object
Show Source
Nested Schema : balances
Type: array
The list of balances associated with the balance group.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : services
Type: array
Show Source
Nested Schema : Balances
Type: object
The list of balances associated with the balance group.
Show Source
Nested Schema : subBalances
Type: array
Show Source
Nested Schema : tempCreditLimit
Type: array
Show Source
Nested Schema : SubBalances
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : TempCreditLimit
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : ServiceType
Type: object
Show Source
Nested Schema : aliasList
Type: array
The list of aliases associated with the service.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : AliasList
Type: object
The list of aliases associated with the service.
Show Source
Nested Schema : CreditCardType
Type: object
Show Source
Nested Schema : DirectDebitType
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : InvoiceType
Type: object
Show Source
Nested Schema : SepaType
Type: object
Show Source
Nested Schema : Details
Type: object
The offer details.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : contacts
Type: object
An account's contact information.
Show Source
Nested Schema : phonenumbers
Type: array
The list of associated phone numbers.
Show Source
Nested Schema : Phonenumbers
Type: object
The list of the account's phone numbers.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : paymentInstrument
Type: array
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : name
Type: object
Show Source
Nested Schema : PaymentInstrumentType
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Back to Top

Response

200 Response

The account was updated successfully.

500 Response

An internal server error occurred.
Back to Top

Examples

These examples show how to add and remove an account's contact by submitting a PUT request on the REST resource using cURL. For more information about cURL, see "Use cURL".

cURL Command

curl -X PUT 'http://hostname:port/bcws/webresources/version/accounts/general' -H 'content-type: application/json' -d @updateAccount.json

where:

  • hostname is the URL for the Billing Care REST server.
  • port is the port for the Billing Care REST server.
  • version is the version of the API you're using, such as v1.0.
  • updateAccount.json is the JSON file that specifies the account details to update.

Example of Request Body for Adding a Contact

This example shows the contents of the updateAccount.json file sent as the request body to add a new contact. Because the elem property is set to 2, the contact will be added in the second position in the array. The value for elem for any existing contacts will be adjusted accordingly.

{
    "id": "0.0.0.1+-account+57615",
    "contacts": [
        {
            "address": "401 Island Parkway ",
            "city": "Redwood Shores",
            "country": "US",
            "firstName": "Mary",
            "lastName": "Williams",
            "contactType": "CA Office",
            "emailAddress": "email@example.com",
            "salutation": "Ms.",
            "state": "CA",
            "zip": "94065",
            "deleted": "false",
            "elem": "2"
        }
    ]
}

Example of Request Body for Deleting a Contact

This example shows the contents of the updateAccount.json file sent as the request body to delete a contact. Only the deleted and elem properties are considered. Any other properties specified for the contact are ignored. Because elem is set to 1, the first contact in the array will be deleted. The value for elem for any remaining contacts is not adjusted.

{
    "id": "0.0.0.1+-account+57615",
    "contacts": [
        {
            "deleted": true,
            "elem": "1"
        }
    ]
}

Example of Response Body

If successful, the response code 200 is returned with no response body.

Back to Top