POST/counterparty/{userId}/create

Create Counterparty (Business)

Creates a business counterparty for a user.

Path variables

FieldTypeRequiredPossible valuesDescription
userIdstringRequired

Unique user ID for whom the counterparty is being created.

Headers

FieldTypeRequiredPossible valuesDescription
session-tokenstringRequired

SessionToken obtained from the Create GMA Session endpoint. All secured endpoints require this header.

Request body

FieldTypeRequiredPossible valuesDescription
GroupstringRequiredBusiness

Counterparty group type.

CustomValues.BusinessNamestringRequired

Name of the business counterparty.

CustomValues.BusinessRegistrationCountrystringRequiredUS

Country of registration of the business counterparty.

CustomValues.BusinessFormationDatestringRequiredYYYY-MM-DD

Date of formation of the business counterparty.

AddressesarrayRequired[{ Name, Street, BuildingNumber, City, Region, Zip, Country }]

Array of address objects.

EmailstringOptional

Email address of the business counterparty.

CustomValues.BusinessRegistrationNumberstringOptional

Registration number of the business counterparty.

CustomValues.RelationshipstringOptionalSELF | NIECE | SISTER_IN_LAW | SON | AUNT | BROTHER | FRIEND | MOTHER_IN_LAW | AFFILIATE | CLIENT | CONTRACTOR | EMPLOYEE | VENDOR | OTHER | BROTHER_IN_LAW | FATHER | FATHER_IN_LAW | NEPHEW | SISTER | UNCLE | WIFE | COUSIN | DAUGHTER | GRAND_FATHER | GRAND_MOTHER | HUSBAND | MOTHER

Relationship to the counterparty.

CustomValues.RelationshipOtherstringOptional

Required only when Relationship is OTHER. Free-text description of the relationship.

MobilePhonesarrayOptional[{ Name: MOBILE | LAND_LINE, Number }]

Array of phone objects.

Example request

{
  "Group": "Business",
  "Email": "accounting@example.com",
  "CustomValues": {
    "BusinessName": "Sample Corp Ltd",
    "BusinessRegistrationNumber": "987654321",
    "BusinessRegistrationCountry": "US",
    "BusinessFormationDate": "2015-03-20",
    "Relationship": "CONTRACTOR"
  },
  "Addresses": [
    {
      "Name": "Headquarters",
      "Street": "500 Technology Drive",
      "BuildingNumber": "Building A, Suite 200",
      "City": "San Jose",
      "Region": "CA",
      "Zip": "95134",
      "Country": "US"
    }
  ],
  "MobilePhones": [
    {
      "Name": "MOBILE",
      "Number": "+14085551234"
    }
  ]
}

Response

FieldTypePossible valuesDescription
ResponseCodeinteger200 | 201 | 204 | 301 | 400 | 401 | 403 | 404 | 410 | 422 | 500 | 503

API result code in the response envelope. Indicates success or the error category (e.g. 200 success, 400 bad request, 401 unauthorized).

ResponseMessagestringSuccess | Created | NoContent | BadRequest | Unauthorized | Forbidden | NotFound | Gone | UnprocessableContent | ServerError | ResourceMoved | ServiceUnAvailable | UnProcessableEntity

Human-readable label paired with ResponseCode (e.g. Success, BadRequest, Unauthorized). Use with ResponseCode to interpret the outcome.

ResponseDataobjectPlease refer to below example for response body

ID of the newly created business counterparty.

Example response

{
  "ResponseCode": 200,
  "ResponseMessage": "Success",
  "ResponseData": "3709731675847438301"
}

Requires `session-token: {SessionToken}` from Create GMA Session. Use the same client IP as authentication.

Search guide books, endpoints, paths, or parameters

↑↓navigateopenEscclose