> You are reading the Docusign Developer Documentation. For clean Markdown of any page, append .md to the page URL.
>
> Documentation indexes by section:
> - APIs and SDKs: https://docusign.docs.buildwithfern.com/docs/llms.txt
> - Platform 101: https://docusign.docs.buildwithfern.com/platform/llms.txt
> - Extension Apps: https://docusign.docs.buildwithfern.com/extension-apps/llms.txt
> - Docusign CLI: https://docusign.docs.buildwithfern.com/docusign-cli/llms.txt
>
> Authentication (OAuth, JWT Grant, M2M): https://docusign.docs.buildwithfern.com/platform/auth
> Webhooks and Connect: https://docusign.docs.buildwithfern.com/platform/webhooks
>
> OpenAPI specifications: https://docusign.docs.buildwithfern.com/openapi.json
> MCP server: https://docusign.docs.buildwithfern.com/_mcp/server

# Accessing the Java SDK object model

> **Note**
>
> Learn about [Quickstart](/docs/esign-rest-api/quickstart) and how you can use it to quickly set up and run eSignature REST API code examples.

## Instantiating the models

When making a specific eSignature REST API call using the
[Java SDK](/docs/esign-rest-api/sdks/java), you usually have to include a specific class used for the data sent or returned as part of that API request. The Java classes used to pass data to and from API endpoints are called
*models*, and all use standard Java properties to get and set values. We will use the
`Brand` object as an example. The
[Brand class](https://github.com/docusign/docusign-java-client/blob/master/src/main/java/com/docusign/esign/model/Brand.java) can be found in our open-source GitHub repository. Most helper methods are annotated with JavaDoc compatible comments to assist with code completion featured by various IDEs to help developers when accessing public libraries.

```text
    public String getBrandName() {
    return brandName;
  }
```

`BrandName` is an example of a string that is part of the
`Brand` class that has both a public getter and a public setter. To set the
`BrandName` property of a
`Brand` object, use this code:

```text
    brand.setBrandName("My Brand");
```

To get the value of the
`BrandName` property, you can simply use the string that it returns like this:

```text
    System.out.println("The brand name is " + brand.getBrandName());
```

Most Java SDK models can be utilized through the builder pattern. Instead of using the getter and setter methods, you could instantiate the class for your model, then set corresponding parameters without breaking into a new line. For example, you could instantiate a new
`Brand` object and set some of its properties at the same time, like this:

```text
    Brand brand = new Brand()
        .brandName("My Brand")
        .defaultBrandLanguage("en")
        .colors(List.of(myBrandColors));
```

## Making API calls

To construct an API call, you need to include both the model and the
`accountId` of the account making the API call each time you make a request. That information is not part of the
`ApiClient` object, but is required by the SDK to be able to generate the URL for the specific endpoint.

For example, to create a new brand, you would instantiate a
`Brand` object and populate it with initial values as shown above, and then use it along with the
`accountId` to call the API, as shown below:

```text
    BrandResponse results = accountsApi.updateBrand(accountId, brandId, brand);
```

## Naming conventions

The Java SDK uses the Java
[Naming Conventions](https://www.oracle.com/java/technologies/javase/codeconventions-namingconventions.html). All classes use PascalCase; methods and parameters use camelCase.

* The categories in the API Reference are called
  `Apis` in the Java SDK and can be found in the
  `com.docusign.esign.api` namespace. As an example, the
  `AccountsApi` class would be the class you use to make API calls for endpoints in the
  [Accounts Category](/docs/esign-rest-api/reference/accounts) in the API Reference.

* The resources within each category in the API Reference do not have direct counterparts in the Java SDK. Instead, each API method in each resource corresponds to a Java method within the class corresponding to the top-level category. The method name is always camelCase and is a combination of the verb and the object that is being worked on. For example, for the
  [AccountBrands: update](/docs/esign-rest-api/reference/accounts/accountbrands/update) API method, the Java method within the
  `AccountsApi` class is named
  `updateBrand` .

* The parameters for each API method are based on the API Reference. Every API call has to specify the
  `accountId` as its first parameter, required to determine which account is making the API request. The remaining parameters are defined per API call in the documentation and may include optional parameters. Parameter names are always written in camelCase.

* The request and response objects (if they exist; some methods have one or the other) are all defined as objects in the
  `com.docusign.esign.model` namespace as public classes. These classes are a deserialized version of the JSON that is sent by the REST API. For example, the
  `updateBrand` method returns an object called
  `Brand,` which represents the response of the API call. Models do not include any methods; they only include properties (all written in camelCase) that have getters and setters. For any array returned by the JSON, the model would include a
  `List<T>` with elements corresponding to that information where
  `T` can be another model or a simple type (typically a string). All models also implement two interfaces:
  `public boolean equals(java.lang.Object o)` and
  `public String toString()` to support comparison as well as cleanup of unused objects.