Keeping User Profiles Updated

Overview

It's essential to keep your user's profiles up to date so Abound can accurately submit Quarterly Tax Payments and generate documents on behalf of your Users without error.

Required Profile Information

Keep the following profile information updated to ensure you don't run into any issues generating documents with Abound APIs:

  • firstName
  • lastName
  • address
  • city
  • state
  • zipcode
  • country
  • phoneNumber
  • dateOfBirth
  • socialSecurityNumber

Updating a User

To update a User, call the PUT /users/{userId} API endpoint. All fields are optional, so you only have to update the information that has changed.

curl \
  --request PUT \
  --url https://sandbox-api.withabound.com/<<apiVersion>>/users/<<testUserId>> \
  --header 'Authorization: Bearer <<apiKey>>' \
  --header 'Content-Type: application/json' \
  --data '{
    "user": {
      "email": "[email protected]",
      "profile": {
        "firstName": "Sam",
        "lastName": "Wilson",
        "address": "1500 Pennsylvania Ave NW",
        "address2": "Suite 1776",
        "city": "Washington",
        "state": "DC",
        "zipcode": "20220",
        "country": "US",
        "phoneNumber": "2026229979",
        "dateOfBirth": "1776-07-04",
        "socialSecurityNumber": "123456789"
      }
    }
  }'
const { default: Abound, Environment } = require("@withabound/node-sdk");

const abound = new Abound({
  appId: "<<sandbox_app_id>>",
  appSecret: "<<sandbox_app_secret>>",
  environment: Environment.SANDBOX,
  apiVersion: "<<apiVersion>>",
});

(async () => {
  const response = await abound.users.update(
    "<<testUserId>>",
    {
      email: "[email protected]",
      profile: {
        firstName: "Sam",
        lastName: "Wilson",
        address: "1500 Pennsylvania Ave NW",
        address2: "Suite 1776",
        city: "Washington",
        state: "DC",
        zipcode: "20220",
        country: "US",
        phoneNumber: "2026229979",
        dateOfBirth: "1776-07-04",
        socialSecurityNumber: "123456789",
      },
    }
  );

  console.log(response);
})();
import requests

url = "https://sandbox-api.withabound.com/<<apiVersion>>/users/<<testUserId>>"

payload = {"user": {
        "profile": {
            "firstName": "Sam",
            "lastName": "Wilson",
            "address": "1500 Pennsylvania Ave NW",
            "address2": "Suite 1776",
            "city": "Washington",
            "state": "DC",
            "zipcode": "20220",
            "country": "US",
            "phoneNumber": "2026229979",
            "dateOfBirth": "1776-07-04",
            "socialSecurityNumber": "123456789"
        },
        "email": "[email protected]"
    }}
headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Authorization": "Bearer <<apiKey>>"
}

response = requests.request("PUT", url, json=payload, headers=headers)

print(response.text)
// import com.squareup.okhttp.*;
// import com.google.gson.JsonObject;

OkHttpClient client = new OkHttpClient();

JsonObject requestBody = new JsonObject();
JsonObject user = new JsonObject();
JsonObject profile = new JsonObject();

user.addProperty("email", "[email protected]");

profile.addProperty("firstName", "Sam");
profile.addProperty("lastName", "Wilson");
profile.addProperty("addPropertyress", "1500 Pennsylvania Ave NW");
profile.addProperty("addPropertyress2", "Suite 1776");
profile.addProperty("city", "Washington");
profile.addProperty("state", "DC");
profile.addProperty("zipcode", "20220");
profile.addProperty("country", "US");
profile.addProperty("phoneNumber", "2026229979");
profile.addProperty("dateOfBirth", "1776-07-04");
profile.addProperty("socialSecurityNumber", "123456789");

user.add("profile", profile);

requestBody.add("user", user);

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, requestBody.toString());
Request request = new Request.Builder()
  .url("https://sandbox-api.withabound.com/<<apiVersion>>/users/<<testUserId>>")
  .put(body)
  .addHeader("Accept", "application/json")
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Bearer <<apiKey>>")
  .build();

Response response = client.newCall(request).execute();
package main

import (
    "bytes"
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://sandbox-api.withabound.com/<<apiVersion>>/users/<<testUserId>>"

    var requestBody = []byte(`{
        "user": {
            "email": "[email protected]",
            "profile": {
                "firstName": "Sam",
                "lastName": "Wilson",
                "address": "1500 Pennsylvania Ave NW",
                "address2": "Suite 1776",
                "city": "Washington",
                "state": "DC",
                "zipcode": "20220",
                "country": "US",
                "phoneNumber": "2026229979",
                "dateOfBirth": "1776-07-04",
                "socialSecurityNumber": "123456789"
            }
        }
    }`)

    req, _ := http.NewRequest("PUT", url, bytes.NewBuffer(requestBody))

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Authorization", "Bearer <<apiKey>>")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
// using RestSharp;

var client = new RestClient("https://sandbox-api.withabound.com/<<apiVersion>>/users/<<testUserId>>");
var request = new RestRequest(Method.PUT);
request.AddHeader("Accept", "application/json");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer <<apiKey>>");
request.AddJsonBody(new {
  user = new {
    email = "[email protected]",
    profile = new {
      firstName =  "Sam",
      lastName = "Wilson",
      address = "1500 Pennsylvania Ave NW",
      address2 = "Suite 1776",
      city = "Washington",
      state = "DC",
      zipcode = "20220",
      country = "US",
      phoneNumber = "2026229979",
      dateOfBirth = "1776-07-04",
      socialSecurityNumber = "123456789"
    }
  }
});
IRestResponse response = client.Execute(request);
require 'uri'
require 'net/http'
require 'openssl'
require 'json'

url = URI("https://sandbox-api.withabound.com/<<apiVersion>>/users/<<testUserId>>")
requestBody = {
  user: {
    email: '[email protected]',
    profile: {
      firstName: 'Sam',
      lastName: 'Wilson',
      address: '1500 Pennsylvania Ave NW',
      address2: 'Suite 1776',
      city: 'Washington',
      state: 'DC',
      zipcode: '20220',
      country: 'US',
      phoneNumber: '2026229979',
      dateOfBirth: '1776-07-04',
      socialSecurityNumber: '123456789'
    }
  }
}

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["Authorization"] = 'Bearer <<apiKey>>'
request.body = requestBody.to_json

response = http.request(request)
puts response.read_body