CustomersCustomer Account Notes API

Customer Account Notes API

Create and maintain comments on a particular customer, visible in the Notes tab of the Customers Module.

This API allows you to create and maintain comments on a particular customer. Once created, the comments are visible within the customer's record, which is accessible in the Notes tab of the Customers Module.

API Contingencies and Combinations:

The Customer Account Notes API supports the creation and maintenance of notes on a customer account. As such, you do need to create the customers for which notes will be created using the Customer Profile APIs.

This API provides a set of methods that do the following:

Add Notes to a Customer Account

Adds comments to a customer account.

Endpoints for Add Notes to a Customer Account

This method offers the following endpoints:

REST Endpoints

POST /priv/v1/apps/:api_key/users/:user_id/user_account_comments
POST /priv/v1/apps/:api_key/external/users/:external_id/user_account_comments

For more information on how to specify an endpoint as part of an actual URL, see Before You Begin. The procedure in this section includes a sample URL for a customer transaction.

Endpoint Parameters for Add Notes to a Customer Account

The following parameters are available when specifying the endpoint for this method:

Endpoint ParameterDescription
api_keySupplied by the SessionM Platform, the API key is necessary to authenticate any HTTP request to a SessionM API. This key is associated to an API secret, which ties the authentication to a specific application or web site within the organization. The platform maintains each application or site as a digital property, something that can be configured using the SessionM UI.
user_idInternal identifier for the customer within the SessionM Platform.
external_idIdentifier for a customer in an external system integrating with the SessionM Platform.

Request Object for Add Notes to a Customer Account

When this method runs, it passes in a request object that contains a user_account_comment object, as shown below:

JSON Request

{
    "user_account_comment": {
        "comment": "testComment",
        "admin_id": 1
    }
}

The object's attributes are detailed in the following table:

Request Attributes for User Account Comment

AttributeType
Required/Optional
Description
commentstring
required
Free form comments being added to notes maintained for customer.
admin_idinteger
required
Account identifier of the SMP account, which is different from the user account.

Response Object for Add Notes to a Customer Account

In addition to a status value-pair for the transaction, the response object returned by the method contains a user_account_comment object.

Consider the following sample:

JSON Response

{
    "status": "ok",
    "user_account_comment": {
        "id": 3,
        "player_user_id": "c0b1fd0a-cd55-11e8-8fa6-845889cb62b1",
        "comment": "testComment",
        "commented_by": "AdOps Admin",
        "updated": false,
        "created_at": "October 12, 2018 14:48",
        "updated_at": "October 12, 2018 14:48",
        "reason_text": "No Reason Given"
    }
}

The following tables document this object, along with the associated account statuses:

Response Attributes for User Account Comment

AttributeTypeDescription
idintegerIdentifier for comment.
player_user_idstringIdentifier for user that comment applies to.
commentstringComment displayed in notes field.
commented_bystringSMP account name; comes from admin_id.
updatedbooleanSpecifies whether record was updated, true or false.
created_atstringDate that comment was created.
updated_atstringDate of last update to comment.
reason_textstringReason selected when comment created.

Statuses and Errors for Add Notes to a Customer Account

When this method makes a successful call to the platform, it returns a 200-level status code. When the string returned with a 200-level status code is ok, the transaction did process. But, if the string returned is error, you need to discover what type of error occurred.

Returned errors can be either method-specific or generic. No error messages are defined for this method except for the generic statuses and errors returned for any object. For more information, see the associated section in Generic Statuses and Errors.

Retrieve a Note on a Customer Account

Retrieves a specific note on a customer account.

Endpoints for Retrieve a Note on a Customer Account

This method offers the following endpoints:

REST Endpoints

GET /priv/v1/apps/:api_key/external/users/:external_id/user_account_comments/ID
GET /priv/v1/apps/:api_key/external/users/:user_id/user_account_comments/ID

For more information on how to specify an endpoint as part of an actual URL, see Before You Begin. The procedure in this section includes a sample URL for a customer transaction.

Endpoint Parameters for Retrieve a Note on a Customer Account

The following parameters are available when specifying the endpoint for this method:

Endpoint ParameterDescription
api_keySupplied by the SessionM Platform, the API key is necessary to authenticate any HTTP request to a SessionM API. This key is associated to an API secret, which ties the authentication to a specific application or web site within the organization. The platform maintains each application or site as a digital property, something that can be configured using the SessionM UI.
user_idInternal identifier for the customer within the SessionM Platform.
external_idIdentifier for a customer in an external system integrating with the SessionM Platform.

Request Object for Retrieve a Note on a Customer Account

Not applicable.

Response Object for Retrieve a Note on a Customer Account

In addition to a status value-pair for the transaction, the response object returned by the method contains a user_account_comment object.

Consider the following sample:

JSON Response

{
    "status": "ok",
    "user_account_comment": {
        "id": 3,
        "player_user_id": "c0b1fd0a-cd55-11e8-8fa6-845889cb62b1",
        "comment": "testComment",
        "commented_by": "AdOps Admin",
        "updated": false,
        "created_at": "October 12, 2018 14:48",
        "updated_at": "October 12, 2018 14:48",
        "reason_text": "No Reason Given"
    }
}

For attribute information on a user_account_comment response object, see the Response Attributes for User Account Comment table.

Statuses and Errors for Retrieve a Note on a Customer Account

When this method makes a successful call to the platform, it returns a 200-level status code. When the string returned with a 200-level status code is ok, the transaction did process. But, if the string returned is error, you need to discover what type of error occurred.

Returned errors can be either method-specific or generic. No error messages are defined for this method except for the generic statuses and errors returned for any object. For more information, see the associated section in Generic Statuses and Errors.

Retrieve All Notes on a Customer Account

Retrieves all notes on a customer account.

Endpoints for Retrieve All Notes on a Customer Account

This method offers the following endpoints:

REST Endpoints

GET /priv/v1/apps/:api_key/external/users/:external_id/user_account_comments
GET /priv/v1/apps/:api_key/external/users/:user_id/user_account_comments

For more information on how to specify an endpoint as part of an actual URL, see Before You Begin. The procedure in this section includes a sample URL for a customer transaction.

Endpoint Parameters for Retrieve All Notes on a Customer Account

The following parameters are available when specifying the endpoint for this method:

Endpoint ParameterDescription
api_keySupplied by the SessionM Platform, the API key is necessary to authenticate any HTTP request to a SessionM API. This key is associated to an API secret, which ties the authentication to a specific application or web site within the organization. The platform maintains each application or site as a digital property, something that can be configured using the SessionM UI.
user_idInternal identifier for the customer within the SessionM Platform.
external_idIdentifier for a customer in an external system integrating with the SessionM Platform.

Request Object for Retrieve All Notes on a Customer Account

Not applicable.

Response Object for Retrieve All Notes on a Customer Account

In addition to a status value-pair for the transaction, the response object returned by the method contains a user_account_comments array. In this array are multiple user_account_comment objects.

Consider the following sample:

JSON Response

{
    "status": "ok",
    "user_account_comments": [
        {
            "id": 3,
            "player_user_id": "c0b1fd0a-cd55-11e8-8fa6-845889cb62b1",
            "comment": "testComment",
            "commented_by": "AdOps Admin",
            "updated": false,
            "created_at": "October 12, 2018 14:48",
            "updated_at": "October 12, 2018 14:48",
            "reason_text": "No Reason Given"
        },
        {
            "id": 5,
            "player_user_id": "c0b1fd0a-cd55-11e8-8fa6-845889cb62b1",
            "comment": "testComment2",
            "commented_by": "AdOps Admin",
            "updated": false,
            "created_at": "October 12, 2018 15:47",
            "updated_at": "October 12, 2018 15:47",
            "reason_text": "No Reason Given"
        }
    ]
}

For attribute information on a user_account_comment response object, see the Response Attributes for User Account Comment table.

Statuses and Errors for Retrieve All Notes on a Customer Account

When this method makes a successful call to the platform, it returns a 200-level status code. When the string returned with a 200-level status code is ok, the transaction did process. But, if the string returned is error, you need to discover what type of error occurred.

Returned errors can be either method-specific or generic. No error messages are defined for this method except for the generic statuses and errors returned for any object. For more information, see the associated section in Generic Statuses and Errors.

Update a note on a Customer Account

Updates a comment on a customer account.

Endpoints for Update a note on a Customer Account

This method offers the following endpoints:

REST Endpoints

PUT /priv/v1/apps/:api_key/external/users/:external_id/user_account_comments/ID
PUT /priv/v1/apps/:api_key/users/:user_id/user_account_comments/ID

For more information on how to specify an endpoint as part of an actual URL, see Before You Begin. The procedure in this section includes a sample URL for a customer transaction.

Endpoint Parameters for Update a note on a Customer Account

The following parameters are available when specifying the endpoint for this method:

Endpoint ParameterDescription
api_keySupplied by the SessionM Platform, the API key is necessary to authenticate any HTTP request to a SessionM API. This key is associated to an API secret, which ties the authentication to a specific application or web site within the organization. The platform maintains each application or site as a digital property, something that can be configured using the SessionM UI.
user_idInternal identifier for the customer within the SessionM Platform.
external_idIdentifier for a customer in an external system integrating with the SessionM Platform.

Request Object for Update a note on a Customer Account

When this method runs, it passes in a request object that contains a user_account_comment object, as shown below:

JSON Request

{
    "user_account_comment": {
        "comment": "updatedTestComment",
        "admin_id": 1
    }
}

For attribute information on a user_account_comment request object, see the Request Attributes for User Account Comment table.

Response Object for Update a note on a Customer Account

In addition to a status value-pair for the transaction, the response object returned by the method contains a user_account_comment object.

Consider the following sample:

JSON Response

{
    "status": "ok",
    "user_account_comment": {
        "id": 3,
        "player_user_id": "c0b1fd0a-cd55-11e8-8fa6-845889cb62b1",
        "comment": "UPDATEtestComment2",
        "commented_by": "AdOps Admin",
        "updated": true,
        "created_at": "October 12, 2018 14:48",
        "updated_at": "October 12, 2018 14:48",
        "reason_text": "No Reason Given"
    }
}

For attribute information on a user_account_comment response object, see the Response Attributes for User Account Comment table.

Statuses and Errors for Update a note on a Customer Account

When this method makes a successful call to the platform, it returns a 200-level status code. When the string returned with a 200-level status code is ok, the transaction did process. But, if the string returned is error, you need to discover what type of error occurred.

Returned errors can be either method-specific or generic. No error messages are defined for this method except for the generic statuses and errors returned for any object. For more information, see the associated section in Generic Statuses and Errors.