Trendsic Platform Service

<back to all web services

StaffResponsesRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/staff/outreach/responses
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class StaffResponseDto:
    staff_outreach_recipient_i_d: int = 0
    contact_i_d: int = 0
    name: Optional[str] = None
    kind: Optional[str] = None
    rate: Decimal = decimal.Decimal(0)
    rating: Decimal = decimal.Decimal(0)
    rating_count: int = 0
    status: Optional[str] = None
    note: Optional[str] = None
    counter_rate: Decimal = decimal.Decimal(0)
    counter_start_date: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class StaffResponsesResponse:
    response_status: Optional[ResponseStatus] = None
    responses: List[StaffResponseDto] = field(default_factory=list)
    sent_count: int = 0
    opened_count: int = 0
    clicked_count: int = 0
    accepted: int = 0
    question: int = 0
    declined: int = 0
    no_reply: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class StaffResponsesRequest:
    placeholder_contact_i_d: int = 0

Python StaffResponsesRequest DTOs

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

HTTP + JSV

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

GET /v1/staff/outreach/responses HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	Responses: 
	[
		{
			StaffOutreachRecipientID: 0,
			ContactID: 0,
			Name: String,
			Kind: String,
			Rate: 0,
			Rating: 0,
			RatingCount: 0,
			Status: String,
			Note: String,
			CounterRate: 0,
			CounterStartDate: String
		}
	],
	SentCount: 0,
	OpenedCount: 0,
	ClickedCount: 0,
	Accepted: 0,
	Question: 0,
	Declined: 0,
	NoReply: 0
}