Trendsic Platform Service

<back to all web services

NewAgentRequest

Requires Authentication
Required roles:Administrator, Administrator, Administrator
The following routes are available for this service:
GET,PUT,OPTIONS/v1/NewAgent/{AgentId}
GET,POST,OPTIONS/v1/NewAgent
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CRM.AgencyPlatform.API.Internal

Namespace Global

    Namespace CRM.AgencyPlatform.API.Internal

        Public Partial Class NewAgent
            Public Overridable Property AgentId As Integer
            Public Overridable Property FirstName As String
            Public Overridable Property LastName As String
            Public Overridable Property UserName As String
            Public Overridable Property Email As String
            Public Overridable Property IsAdmin As Boolean
        End Class

        Public Partial Class NewAgentRequest
            Public Overridable Property AgentId As Integer
            Public Overridable Property NewAgent As List(Of NewAgent) = New List(Of NewAgent)
        End Class

        Public Partial Class NewAgentResponse
            Public Overridable Property ResponseStatus As ResponseStatus
            Public Overridable Property NewAgent As List(Of NewAgent) = New List(Of NewAgent)
        End Class
    End Namespace
End Namespace

VB.NET NewAgentRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/NewAgent HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"AgentId":0,"NewAgent":[{"AgentId":0,"FirstName":"String","LastName":"String","UserName":"String","Email":"String","IsAdmin":false}]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"NewAgent":[{"AgentId":0,"FirstName":"String","LastName":"String","UserName":"String","Email":"String","IsAdmin":false}]}