Account Contacts Service

Available methods:

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

The method r etrieves information about all contacts linked to an account.

Input Parameters

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

Identifies the Partner or account

2 skip query integer Optional Pagination: Number of items to skip
3 take query integer Optional Pagination: Number of items to take

Output Parameters

PageV1Model [ContactGetV1Model]

PageV1Model[ContactGetV1Model] {

count (integer, optional): Pagination: Number of items retrieved,
total (integer, optional): Pagination: Total number of items, items (Array[ContactGetV1Model], optional): An array of items } ContactGetV1Model { contactID (string, optional): The account contact id, login (string, optional): The account contact login, name (string, optional): The account contact name, email (string, optional): The account contact email, alternativeEmail (string, optional): The account contact alternative email, phone (string, optional): The account contact phone, cellularPhone (string, optional): The account contact cellular phone, accessRoleNames (Array[string], optional): The access role names }

Response Class (Status 200)

Returns an array of objects representing contacts linked to the specified account, along with the roles.

Response example

Returns information about 1 contact linked to a specific Partner account , starting from the 2nd (1 skipped):

 Response Body example
{ "count": 1, "total": 2, "items": [ { "contactID": "d7599e091a414a44b3556fa30ab6bf16", "login": "my-test-contact", "name": "my-test-contact", "email": "my-test-contact@test.com", "phone": "1234564765", "accessRoleNames": [ "AG_PRIVATELABELOWNERS", "AG_PRIVATELABELOPERATORS", "AG_PRIVATELABELBILLINGADMINS", "AG_PRIVATELABELCUSTOMIZATIONADMINS", "AG_PRIVATELABELSALES", "AG_PRIVATELABELPUBLICAPI" ] } ] }

Possible error response messages

POST /v1/api/accounts/{customerID}/contacts 

This method creates a contact and assigns it to the specified account.

Input Parameters

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

Identifies the Partner or account to assign the contact to

2 contact body ContactCreateV1Model Required A description of contact to create, along with a list of roles linking it to the specified account

Output Parameters

ContactGetV1Model

ContactGetV1Model { contactID (string, optional): The account contact id, login (string, optional): The account contact login, name (string, optional): The account contact name, email (string, optional): The account contact email, alternativeEmail (string, optional): The account contact alternative email, phone (string, optional): The account contact phone, cellularPhone (string, optional): The account contact cellular phone, accessRoleNames (Array[string], optional): The access role names }

Response Class (Status 201)

Returns an object representing the newly created contact, along with a list of roles linking it to the account.

Request and response examples

Request

Description of contact, that should be created for the specific account:

 Request Body example { "password": "qwerty123!!!", "login": "my-test-contact1", "name": "Test Contact", "email": "my-test-contact1@test.com", "alternativeEmail": "my-test-contact1@test2.com", "phone": "123456789", "cellularPhone": "987654321", "accessRoleNames": [ "AG_PRIVATELABELOPERATORS", "AG_PRIVATELABELBILLINGADMINS" ] }

Response

Data of the newly created contact are returned:

Response Body example
{ "contactID": "ff1124a975a044eeae60a6c7e7bd75a9", "login": "my-test-contact1", "name": "Test Contact", "email": "my-test-contact1@test.com", "alternativeEmail": "my-test-contact1@test2.com", "phone": "123456789", "cellularPhone": "987654321", "accessRoleNames": [ "AG_PRIVATELABELOPERATORS", "AG_PRIVATELABELBILLINGADMINS" ] }  

Possible error response messages

DELETE /v1/api/accounts/{customerID}/contacts/{contactID}

This methond un-assigns a contact from an account

Note: If you un-assign a contact from all active accounts, you will loose access to this contact.

Input Parameters

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

Identifies the Partner or account

2 contactID path string Required

Identifies the contact

Output Parameters

Inline Model {}

Response Class (Status 204)

The contact was successfully un-assigned from the account.

Possible error response messages

GET /v1/api/accounts/{customerID}/contacts/{contactID}  

The method r etrieves information about specific contact linked to an account.

Input Parameters

#ParameterParameter TypeData Type

Mandatory

Description/Valid Values
1 customerID path string Required

Identifies the Partner or account

2 contactID path string Required Identifies the contact

Output Parameters

ContactGetV1Model
{ contactID (string, optional): The account contact id, login (string, optional): The account contact login, name (string, optional): The account contact name, email (string, optional): The account contact email, alternativeEmail (string, optional): The account contact alternative email, phone (string, optional): The account contact phone, cellularPhone (string, optional): The account contact cellular phone, accessRoleNames (Array[string], optional): The access role names }

Response Class (Status 200)

Returns an object representing a contact, with a list of roles associating it with the specified account.

Response example

Displaying the information about a specific contact:

 Response Body { "contactID": "10644e4993814f09a4f872f91b2c79d4", "login": "my-test-contact", "name": "my-test-contact", "email": "my-test-contact@test.com", "alternativeEmail": "", "phone": "123456789", "accessRoleNames": [ "Owner", "User", "BuyingManager" ] }  

Possible error response messages

POST /v1/api/accounts/{customerID}/contacts/{contactID} 

This method a ssigns an existing contact to the account.

Input Parameters

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

Identifies the Partner or the account

2 contactID path

string

Required

Identifies the contact to assign

3 assignment body ContactAssignV1Model Required

An object describing the roles linking contact to the account

Output Parameters

ContactGetV1Model 

ContactGetV1Model
{ contactID (string, optional): The account contact id, login (string, optional): The account contact login, name (string, optional): The account contact name, email (string, optional): The account contact email, alternativeEmail (string, optional): The account contact alternative email, phone (string, optional): The account contact phone, cellularPhone (string, optional): The account contact cellular phone, accessRoleNames (Array[string], optional): The access role names }

Response Class (Status 201)

Returns an object representing the contact, along with a list of roles linking it to the account.

Request and response examples

Request

Description of the assignment details (roles for the contact within the account are specified):

 Request Body example { "targetAccountID": "b29279dec0744bd689c0e9f786c3d01f", "accessRoleNames": [ "AG_PRIVATELABELOPERATORS", "AG_PRIVATELABELPUBLICAPI" ] }

Response

The updated contact information is displayed:

Response Body example
{ "contactID": "10644e4993814f09a4f872f91b2c79d4", "login": "my-test-contact", "name": "my-test-contact", "email": "my-test-contact@test.com", "alternativeEmail": "", "phone": "123456789", "accessRoleNames": [ "AG_PRIVATELABELOPERATORS", "AG_PRIVATELABELPUBLICAPI" ] }

Possible error response messages

PUT /v1/api/accounts/{customerID}/contacts/{contactID}  

The method updates roles for a contact linked to an account.

Input Parameters

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

Identifies the Partner or the account

2 contactID path

string

Required

Identifies the contact

3 contact body ContactUpdateV1Model  Required A new list of roles linking the contact to the account

Output Parameters

ContactUpdateV1Model 

ContactUpdateV1Model
{ accessRoleNames (Array[string]): The access role names }

Response Class (Status 200)

An updated list of roles linking the contact to the account.

Request and response examples

Request

A new list of roles for the contact within the account is specified:

 Request Body example { "accessRoleNames": [ "AG_PRIVATELABELOPERATORS", "AG_PRIVATELABELPUBLICAPI", "AG_PRIVATELABELSALES" ] }

Response

An updated ist of roles is displayed:

 Response Body example { "accessRoleNames": [ "AG_PRIVATELABELOPERATORS", "AG_PRIVATELABELPUBLICAPI", "AG_PRIVATELABELSALES" ] }

Possible error response messages