Trendsic Platform Service

<back to all web services

CustomerNotesRequest

Requires Authentication
Requires any of the roles:Agent, Administrator, Agent, Administrator
The following routes are available for this service:
GET,POST,OPTIONS/v1/customercheckins/{Id}/notes
import 'package:servicestack/servicestack.dart';

class CustomerNote implements IConvertible
{
    int? NoteId;
    String? Scope;
    String? Text;
    bool? IsPriority;
    String? CreatedByUserId;
    String? CreatedByName;
    DateTime? CreatedAt;
    DateTime? DoneAt;
    bool? IsCarry;
    DateTime? ShownAt;

    CustomerNote({this.NoteId,this.Scope,this.Text,this.IsPriority,this.CreatedByUserId,this.CreatedByName,this.CreatedAt,this.DoneAt,this.IsCarry,this.ShownAt});
    CustomerNote.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        NoteId = json['NoteId'];
        Scope = json['Scope'];
        Text = json['Text'];
        IsPriority = json['IsPriority'];
        CreatedByUserId = json['CreatedByUserId'];
        CreatedByName = json['CreatedByName'];
        CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
        DoneAt = JsonConverters.fromJson(json['DoneAt'],'DateTime',context!);
        IsCarry = json['IsCarry'];
        ShownAt = JsonConverters.fromJson(json['ShownAt'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'NoteId': NoteId,
        'Scope': Scope,
        'Text': Text,
        'IsPriority': IsPriority,
        'CreatedByUserId': CreatedByUserId,
        'CreatedByName': CreatedByName,
        'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!),
        'DoneAt': JsonConverters.toJson(DoneAt,'DateTime',context!),
        'IsCarry': IsCarry,
        'ShownAt': JsonConverters.toJson(ShownAt,'DateTime',context!)
    };

    getTypeName() => "CustomerNote";
    TypeContext? context = _ctx;
}

class CustomerNoteResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<CustomerNote>? Notes = [];
    List<CustomerNote>? Carry = [];
    bool? CanPriority;
    CustomerNote? Note;

    CustomerNoteResponse({this.ResponseStatus,this.Notes,this.Carry,this.CanPriority,this.Note});
    CustomerNoteResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        Notes = JsonConverters.fromJson(json['Notes'],'List<CustomerNote>',context!);
        Carry = JsonConverters.fromJson(json['Carry'],'List<CustomerNote>',context!);
        CanPriority = json['CanPriority'];
        Note = JsonConverters.fromJson(json['Note'],'CustomerNote',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'Notes': JsonConverters.toJson(Notes,'List<CustomerNote>',context!),
        'Carry': JsonConverters.toJson(Carry,'List<CustomerNote>',context!),
        'CanPriority': CanPriority,
        'Note': JsonConverters.toJson(Note,'CustomerNote',context!)
    };

    getTypeName() => "CustomerNoteResponse";
    TypeContext? context = _ctx;
}

class CustomerNotesRequest implements IConvertible
{
    String? Id;
    String? Text;
    String? Scope;
    bool? IsPriority;

    CustomerNotesRequest({this.Id,this.Text,this.Scope,this.IsPriority});
    CustomerNotesRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Text = json['Text'];
        Scope = json['Scope'];
        IsPriority = json['IsPriority'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Text': Text,
        'Scope': Scope,
        'IsPriority': IsPriority
    };

    getTypeName() => "CustomerNotesRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'CustomerNote': TypeInfo(TypeOf.Class, create:() => CustomerNote()),
    'CustomerNoteResponse': TypeInfo(TypeOf.Class, create:() => CustomerNoteResponse()),
    'List<CustomerNote>': TypeInfo(TypeOf.Class, create:() => <CustomerNote>[]),
    'CustomerNotesRequest': TypeInfo(TypeOf.Class, create:() => CustomerNotesRequest()),
});

Dart CustomerNotesRequest DTOs

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

HTTP + XML

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

POST /v1/customercheckins/{Id}/notes HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CustomerNotesRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Id>00000000-0000-0000-0000-000000000000</Id>
  <IsPriority>false</IsPriority>
  <Scope>String</Scope>
  <Text>String</Text>
</CustomerNotesRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CustomerNoteResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <CanPriority>false</CanPriority>
  <Carry>
    <CustomerNote>
      <CreatedAt>0001-01-01T00:00:00</CreatedAt>
      <CreatedByName>String</CreatedByName>
      <CreatedByUserId>00000000-0000-0000-0000-000000000000</CreatedByUserId>
      <DoneAt>0001-01-01T00:00:00</DoneAt>
      <IsCarry>false</IsCarry>
      <IsPriority>false</IsPriority>
      <NoteId>0</NoteId>
      <Scope>String</Scope>
      <ShownAt>0001-01-01T00:00:00</ShownAt>
      <Text>String</Text>
    </CustomerNote>
  </Carry>
  <Note>
    <CreatedAt>0001-01-01T00:00:00</CreatedAt>
    <CreatedByName>String</CreatedByName>
    <CreatedByUserId>00000000-0000-0000-0000-000000000000</CreatedByUserId>
    <DoneAt>0001-01-01T00:00:00</DoneAt>
    <IsCarry>false</IsCarry>
    <IsPriority>false</IsPriority>
    <NoteId>0</NoteId>
    <Scope>String</Scope>
    <ShownAt>0001-01-01T00:00:00</ShownAt>
    <Text>String</Text>
  </Note>
  <Notes>
    <CustomerNote>
      <CreatedAt>0001-01-01T00:00:00</CreatedAt>
      <CreatedByName>String</CreatedByName>
      <CreatedByUserId>00000000-0000-0000-0000-000000000000</CreatedByUserId>
      <DoneAt>0001-01-01T00:00:00</DoneAt>
      <IsCarry>false</IsCarry>
      <IsPriority>false</IsPriority>
      <NoteId>0</NoteId>
      <Scope>String</Scope>
      <ShownAt>0001-01-01T00:00:00</ShownAt>
      <Text>String</Text>
    </CustomerNote>
  </Notes>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</CustomerNoteResponse>