Available methods:

GET /v1/api/accounts/{customerID}/company 

This method retrieves company information.

Input Parameters

#ParameterParameter TypeData TypeMandatoryDescription/Valid Values
1 customerID path string Required

Partner id or account id to retrieve the company information for

Output Parameters

CompanyV1Model 

CompanyV1Model {

name (string): The account company name,
phone (string): The account company phone,
address (AddressV1Model): The account company address
}

AddressV1Model {
country (string): The address country,
state (string, optional): The address state,
city (string): The address city,
street (string): The address street,
zip (string): The address ZIP
}  

Response Class (Status 200)

An object describing company information for the specified Partner or account.

Response example

Company information for the specific Partner (CustomerID) is displayed:

  {
"name": "my-test-partner-account",
"phone": "45465456456",
"address": {
"country": "United States",
"state": "California",
"city": "Anaheim",
"street": "100 South Anaheim Boulevard",
"zip": "92311-1411"
}
}  

Possible error response messages

PUT /v1/api/accounts/{customerID}/company 

The method updates company information.

Input Parameters

#ParameterParameter TypeData TypeMandatoryDescription/Valid Values
1 customerID path string Required

Identifies the Partner or account to update the company information for

2 company body

CompanyUpdateV1Model 

Required

An object describing updated company information for the specified account

Output Parameters

CompanyV1Model

CompanyV1Model {
name (string): The account company name,
phone (string): The account company phone,
address (AddressV1Model): The account company address
}
AddressV1Model {
country (string): The address country,
state (string, optional): The address state,
city (string): The address city,
street (string): The address street,
zip (string): The address ZIP
}  

Response Class (Status 200)

An object describing company information for the specified Partner or account.

Request and response examples

Request

Company information, that should be updated for the specific Partner (name and phone in this case):

 Request Body example {
"name": "New company name",
"phone": "123456789",
"address": {
"country": "United States",
"state": "California",
"city": "Anaheim",
"street": "100 South Anaheim Boulevard",
"zip": "92311-1411"
}
}

Response

Updated information is displayed:

 Response Body example {
"name": "New company name",
"phone": "123456789",
"address": {
"country": "United States",
"state": "California",
"city": "Anaheim",
"street": "100 South Anaheim Boulevard",
"zip": "92311-1411"
}
}  

Possible error response messages

POST /v1/api/accounts/company/validAddress

Address validation method.

Input Parameters

#ParameterParameter TypeData TypeMandatoryDescription/Valid Values
1 companyAddress body

AddressV1Model 

Required

Validation address. See AddressV1Model items

Output Parameters

AddressValidationV1Model

AddressValidationV1Model {
 status (integer, optional): Shows whether a model is valid. = ['0', '1', '2', '3'],
 address (AddressV1Model, optional): Refined address,
 changes (Array[string], optional): A list of fields that have been refined,
 errors (Array[ErrorCode], optional): A list of validation errors
}
AddressV1Model {
 country (string): The address country,
 state (string, optional): The address state,
 city (string): The address city,
 street (string): The address street,
 zip (string): The address ZIP
}
ErrorCode {
 code (string, optional): Error code,
 message (string, optional): Error details
}

Response Class (Status 200)

Refined company address.

Request and response examples

Request

Validation address:

{
    "country": "United States",
    "state": "California",
    "city": "Anaheim",
    "street": "100 South Anaheim Boulevard",
    "zip": "92311-1411"
}

Response

Address validity response:

{
  "status": "Success",
  "address": {
    "country": "United States",
    "state": "California",
    "city": "Anaheim",
    "street": "100 South Anaheim Boulevard",
    "zip": "92311-1411"
  }
}