> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.mercoa.com/embedded-ap-ar/api-reference/entity/representative/update/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mercoa.com/_mcp/server. # Update POST https://api.mercoa.com/entity/{entityId}/representative/{representativeId} Content-Type: application/json Reference: https://docs.mercoa.com/embedded-ap-ar/api-reference/entity/representative/update ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `entityId` (string, required) — Entity ID or Entity ForeignID - `representativeId` (string, required) ### Body (application/json) This endpoint expects an object. - `name` (object, optional) - `firstName` (string, required) - `lastName` (string, required) - `middleName` (string, optional) - `suffix` (string, optional) - `phone` (object, optional) - `countryCode` (string, required) - `number` (string, required) - `email` (string, optional) - `address` (object, optional) - `addressLine1` (string, required) - `city` (string, required) - `stateOrProvince` (string, required) — State or province code. Must be in the format XX. - `postalCode` (string, required) — Postal code. Must be in the format XXXXX or XXXXX-XXXX. - `addressLine2` (string, optional) - `country` (string, optional) - `birthDate` (object, optional) - `day` (string, optional) - `month` (string, optional) - `year` (string, optional) - `governmentID` (object, optional) - `ssn` (string, required) — Full Social Security Number. Must be in the format 123-45-6789. - `responsibilities` (object, optional) - `jobTitle` (string, optional) - `isController` (boolean, optional) — Indicates whether this individual has significant management responsibilities within the business - `isOwner` (boolean, optional) — Indicates whether this individual has an ownership stake of at least 25% in the business - `ownershipPercentage` (integer, optional) — Percentage of ownership in the business. Must be between 0 and 100. ## Response ### 200 - `id` (string, required) - `name` (object, required) - `firstName` (string, required) - `lastName` (string, required) - `middleName` (string, optional) - `suffix` (string, optional) - `address` (object, required) - `addressLine1` (string, required) - `city` (string, required) - `stateOrProvince` (string, required) — State or province code. Must be in the format XX. - `postalCode` (string, required) — Postal code. Must be in the format XXXXX or XXXXX-XXXX. - `addressLine2` (string, optional) - `country` (string, optional) - `birthDateProvided` (boolean, required) - `governmentIDProvided` (boolean, required) - `responsibilities` (object, required) - `jobTitle` (string, optional) - `isController` (boolean, optional) — Indicates whether this individual has significant management responsibilities within the business - `isOwner` (boolean, optional) — Indicates whether this individual has an ownership stake of at least 25% in the business - `ownershipPercentage` (integer, optional) — Percentage of ownership in the business. Must be between 0 and 100. - `createdOn` (datetime, required) - `updatedOn` (datetime, required) - `phone` (object, optional) - `countryCode` (string, required) - `number` (string, required) - `email` (string, optional) - `disabledOn` (datetime, optional) ## Errors ### 400 Bad Request - `errorName` ("BadRequest", required) - `content` (string, required) ### 401 Unauthorized - `errorName` ("Unauthorized", required) - `content` (string, required) ### 403 Forbidden - `errorName` ("Forbidden", required) - `content` (string, required) ### 404 Not Found - `errorName` ("NotFound", required) - `content` (string, required) ### 409 Conflict - `errorName` ("Conflict", required) - `content` (string, required) ### 500 Internal Server Error - `errorName` ("InternalServerError", required) - `content` (string, required) ### 501 Unimplemented - `errorName` ("Unimplemented", required) - `content` (string, required) ## Examples **Request** ```json { "name": { "firstName": "John", "lastName": "Adams", "middleName": "Quincy", "suffix": "Jr." }, "phone": { "countryCode": "1", "number": "4155551234" }, "email": "john.doe@acme.com", "address": { "addressLine1": "123 Main St", "city": "San Francisco", "stateOrProvince": "CA", "postalCode": "94105", "addressLine2": "Unit 1", "country": "US" }, "birthDate": { "day": "1", "month": "1", "year": "1980" }, "governmentID": { "ssn": "123-45-6789" }, "responsibilities": { "isController": true, "isOwner": true, "ownershipPercentage": 40 } } ``` **Response** ```json { "id": "rep_7df2974a-4069-454c-912f-7e58ebe030fb", "name": { "firstName": "John", "lastName": "Adams", "middleName": "Quincy", "suffix": "Jr." }, "address": { "addressLine1": "123 Main St", "city": "San Francisco", "stateOrProvince": "CA", "postalCode": "94105", "addressLine2": "Unit 1", "country": "US" }, "birthDateProvided": true, "governmentIDProvided": true, "responsibilities": { "isController": true, "isOwner": true, "ownershipPercentage": 40 }, "createdOn": "2024-01-01T00:00:00Z", "updatedOn": "2024-01-01T00:00:00Z", "phone": { "countryCode": "1", "number": "4155551234" }, "email": "john.doe@acme.com", "disabledOn": null } ``` **SDK Code** ```python BusinessPayorRepresentative import requests url = "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/representative/rep_7df2974a-4069-454c-912f-7e58ebe030fb" payload = { "name": { "firstName": "John", "lastName": "Adams", "middleName": "Quincy", "suffix": "Jr." }, "phone": { "countryCode": "1", "number": "4155551234" }, "email": "john.doe@acme.com", "address": { "addressLine1": "123 Main St", "city": "San Francisco", "stateOrProvince": "CA", "postalCode": "94105", "addressLine2": "Unit 1", "country": "US" }, "birthDate": { "day": "1", "month": "1", "year": "1980" }, "governmentID": { "ssn": "123-45-6789" }, "responsibilities": { "isController": True, "isOwner": True, "ownershipPercentage": 40 } } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```typescript BusinessPayorRepresentative import { MercoaClient } from "@mercoa/javascript"; const client = new MercoaClient({ token: "YOUR_TOKEN" }); await client.entity.representative.update("ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", "rep_7df2974a-4069-454c-912f-7e58ebe030fb", { name: { firstName: "John", middleName: "Quincy", lastName: "Adams", suffix: "Jr." }, phone: { countryCode: "1", number: "4155551234" }, email: "john.doe@acme.com", address: { addressLine1: "123 Main St", addressLine2: "Unit 1", city: "San Francisco", stateOrProvince: "CA", postalCode: "94105", country: "US" }, birthDate: { day: "1", month: "1", year: "1980" }, governmentId: { ssn: "123-45-6789" }, responsibilities: { isOwner: true, ownershipPercentage: 40, isController: true } }); ``` ```go BusinessPayorRepresentative package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/representative/rep_7df2974a-4069-454c-912f-7e58ebe030fb" payload := strings.NewReader("{\n \"name\": {\n \"firstName\": \"John\",\n \"lastName\": \"Adams\",\n \"middleName\": \"Quincy\",\n \"suffix\": \"Jr.\"\n },\n \"phone\": {\n \"countryCode\": \"1\",\n \"number\": \"4155551234\"\n },\n \"email\": \"john.doe@acme.com\",\n \"address\": {\n \"addressLine1\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"stateOrProvince\": \"CA\",\n \"postalCode\": \"94105\",\n \"addressLine2\": \"Unit 1\",\n \"country\": \"US\"\n },\n \"birthDate\": {\n \"day\": \"1\",\n \"month\": \"1\",\n \"year\": \"1980\"\n },\n \"governmentID\": {\n \"ssn\": \"123-45-6789\"\n },\n \"responsibilities\": {\n \"isController\": true,\n \"isOwner\": true,\n \"ownershipPercentage\": 40\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby BusinessPayorRepresentative require 'uri' require 'net/http' url = URI("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/representative/rep_7df2974a-4069-454c-912f-7e58ebe030fb") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"name\": {\n \"firstName\": \"John\",\n \"lastName\": \"Adams\",\n \"middleName\": \"Quincy\",\n \"suffix\": \"Jr.\"\n },\n \"phone\": {\n \"countryCode\": \"1\",\n \"number\": \"4155551234\"\n },\n \"email\": \"john.doe@acme.com\",\n \"address\": {\n \"addressLine1\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"stateOrProvince\": \"CA\",\n \"postalCode\": \"94105\",\n \"addressLine2\": \"Unit 1\",\n \"country\": \"US\"\n },\n \"birthDate\": {\n \"day\": \"1\",\n \"month\": \"1\",\n \"year\": \"1980\"\n },\n \"governmentID\": {\n \"ssn\": \"123-45-6789\"\n },\n \"responsibilities\": {\n \"isController\": true,\n \"isOwner\": true,\n \"ownershipPercentage\": 40\n }\n}" response = http.request(request) puts response.read_body ``` ```java BusinessPayorRepresentative import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/representative/rep_7df2974a-4069-454c-912f-7e58ebe030fb") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"name\": {\n \"firstName\": \"John\",\n \"lastName\": \"Adams\",\n \"middleName\": \"Quincy\",\n \"suffix\": \"Jr.\"\n },\n \"phone\": {\n \"countryCode\": \"1\",\n \"number\": \"4155551234\"\n },\n \"email\": \"john.doe@acme.com\",\n \"address\": {\n \"addressLine1\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"stateOrProvince\": \"CA\",\n \"postalCode\": \"94105\",\n \"addressLine2\": \"Unit 1\",\n \"country\": \"US\"\n },\n \"birthDate\": {\n \"day\": \"1\",\n \"month\": \"1\",\n \"year\": \"1980\"\n },\n \"governmentID\": {\n \"ssn\": \"123-45-6789\"\n },\n \"responsibilities\": {\n \"isController\": true,\n \"isOwner\": true,\n \"ownershipPercentage\": 40\n }\n}") .asString(); ``` ```php BusinessPayorRepresentative request('POST', 'https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/representative/rep_7df2974a-4069-454c-912f-7e58ebe030fb', [ 'body' => '{ "name": { "firstName": "John", "lastName": "Adams", "middleName": "Quincy", "suffix": "Jr." }, "phone": { "countryCode": "1", "number": "4155551234" }, "email": "john.doe@acme.com", "address": { "addressLine1": "123 Main St", "city": "San Francisco", "stateOrProvince": "CA", "postalCode": "94105", "addressLine2": "Unit 1", "country": "US" }, "birthDate": { "day": "1", "month": "1", "year": "1980" }, "governmentID": { "ssn": "123-45-6789" }, "responsibilities": { "isController": true, "isOwner": true, "ownershipPercentage": 40 } }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp BusinessPayorRepresentative using RestSharp; var client = new RestClient("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/representative/rep_7df2974a-4069-454c-912f-7e58ebe030fb"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"name\": {\n \"firstName\": \"John\",\n \"lastName\": \"Adams\",\n \"middleName\": \"Quincy\",\n \"suffix\": \"Jr.\"\n },\n \"phone\": {\n \"countryCode\": \"1\",\n \"number\": \"4155551234\"\n },\n \"email\": \"john.doe@acme.com\",\n \"address\": {\n \"addressLine1\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"stateOrProvince\": \"CA\",\n \"postalCode\": \"94105\",\n \"addressLine2\": \"Unit 1\",\n \"country\": \"US\"\n },\n \"birthDate\": {\n \"day\": \"1\",\n \"month\": \"1\",\n \"year\": \"1980\"\n },\n \"governmentID\": {\n \"ssn\": \"123-45-6789\"\n },\n \"responsibilities\": {\n \"isController\": true,\n \"isOwner\": true,\n \"ownershipPercentage\": 40\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift BusinessPayorRepresentative import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "name": [ "firstName": "John", "lastName": "Adams", "middleName": "Quincy", "suffix": "Jr." ], "phone": [ "countryCode": "1", "number": "4155551234" ], "email": "john.doe@acme.com", "address": [ "addressLine1": "123 Main St", "city": "San Francisco", "stateOrProvince": "CA", "postalCode": "94105", "addressLine2": "Unit 1", "country": "US" ], "birthDate": [ "day": "1", "month": "1", "year": "1980" ], "governmentID": ["ssn": "123-45-6789"], "responsibilities": [ "isController": true, "isOwner": true, "ownershipPercentage": 40 ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/representative/rep_7df2974a-4069-454c-912f-7e58ebe030fb")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```