Trendsic Platform Service

<back to all web services

CrewMembersRequest

Requires Authentication
The following routes are available for this service:
GET,POST,PUT,DELETE,OPTIONS/v1/Crew/Members
GET,POST,PUT,DELETE,OPTIONS/v1/Crew/Members/{CrewID]
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 Contact:
    contact_id: int = 0
    contact_type: int = 0
    first_name: Optional[str] = None
    last_name: Optional[str] = None
    name: Optional[str] = None
    role: Optional[str] = None
    title: Optional[str] = None
    email_work: Optional[str] = None
    email_personal: Optional[str] = None
    district: Optional[str] = None
    district_i_d: int = 0
    school: Optional[str] = None
    school_i_d: int = 0
    state: Optional[str] = None
    state_name: Optional[str] = None
    state_i_d: int = 0
    county_i_d: int = 0
    county: Optional[str] = None
    phone: Optional[str] = None
    department: Optional[str] = None
    flow: Optional[str] = None
    last_contact: datetime.datetime = datetime.datetime(1, 1, 1)
    do_not_contact: bool = False
    active: bool = False
    agent_id: int = 0
    phone_alt: Optional[str] = None
    pera_contact_id: int = 0
    room_number: Optional[str] = None
    source_type_id: int = 0
    source_type_desc: Optional[str] = None
    source_note: Optional[str] = None
    contact_status_id: int = 0
    contact_status_desc: Optional[str] = None
    ssn: Optional[str] = None
    date_of_birth: datetime.datetime = datetime.datetime(1, 1, 1)
    deleted: bool = False
    is_shared: bool = False
    address_line1: Optional[str] = None
    address_city: Optional[str] = None
    address_state: Optional[str] = None
    address_zip: Optional[str] = None
    deleted_by: Optional[str] = None
    deleted_date_time_utc: Optional[datetime.datetime] = None
    has_n_b_c: bool = False
    has_fact_finder_sheet: bool = False
    middle_initial: Optional[str] = None
    tags: Optional[str] = None
    date_created: datetime.datetime = datetime.datetime(1, 1, 1)
    phone_label: Optional[str] = None
    alt_phone_label: Optional[str] = None
    carriers: Optional[str] = None
    contact_image: Optional[str] = None
    company_affiliation: Optional[str] = None
    additional_information: Optional[str] = None
    has_gift_card: bool = False
    contact_category: int = 0
    writing_agent_id: int = 0
    writing_agent_name: Optional[str] = None
    marital_status: Optional[str] = None
    total_debt_amount: Decimal = decimal.Decimal(0)
    number_of_debt_accounts: int = 0
    fact_finder_code_id: int = 0
    business_name: Optional[str] = None
    dba: Optional[str] = None
    contact_g_u_i_d: Optional[str] = None
    project_end_date: datetime.datetime = datetime.datetime(1, 1, 1)
    rate: int = 0
    job_i_d: int = 0
    job_name: Optional[str] = None
    job_count: int = 0
    locked: bool = False
    locked_by_agent_id: int = 0
    locked_timestamp: datetime.datetime = datetime.datetime(1, 1, 1)
    initials: Optional[str] = None
    contact_category_name: Optional[str] = None
    sms_opt_in: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CrewMembersResponse:
    response_status: Optional[ResponseStatus] = None
    crew_members: List[Contact] = field(default_factory=list)


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CrewMembersRequest:
    crew_i_d: int = 0
    tags: Optional[str] = None

Python CrewMembersRequest 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.

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

{
	CrewID: 0,
	Tags: String
}
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
		}
	},
	CrewMembers: 
	[
		{
			ContactId: 0,
			ContactType: 0,
			FirstName: String,
			LastName: String,
			Name: String,
			Role: String,
			Title: String,
			EmailWork: String,
			EmailPersonal: String,
			District: String,
			DistrictID: 0,
			School: String,
			SchoolID: 0,
			State: String,
			StateName: String,
			StateID: 0,
			CountyID: 0,
			County: String,
			Phone: String,
			Department: String,
			Flow: String,
			LastContact: 0001-01-01,
			DoNotContact: False,
			Active: False,
			AgentId: 0,
			PhoneAlt: String,
			PeraContactId: 0,
			RoomNumber: String,
			SourceTypeId: 0,
			SourceTypeDesc: String,
			SourceNote: String,
			ContactStatusId: 0,
			ContactStatusDesc: String,
			SSN: String,
			DateOfBirth: 0001-01-01,
			Deleted: False,
			IsShared: False,
			address_line1: String,
			address_city: String,
			address_state: String,
			address_zip: String,
			DeletedBy: String,
			DeletedDateTimeUtc: 0001-01-01,
			HasNBC: False,
			HasFactFinderSheet: False,
			MiddleInitial: String,
			Tags: String,
			DateCreated: 0001-01-01,
			PhoneLabel: String,
			AltPhoneLabel: String,
			Carriers: String,
			ContactImage: String,
			CompanyAffiliation: String,
			AdditionalInformation: String,
			HasGiftCard: False,
			ContactCategory: 0,
			WritingAgentId: 0,
			WritingAgentName: String,
			MaritalStatus: String,
			TotalDebtAmount: 0,
			NumberOfDebtAccounts: 0,
			FactFinderCodeId: 0,
			BusinessName: String,
			DBA: String,
			ContactGUID: 00000000000000000000000000000000,
			ProjectEndDate: 0001-01-01,
			Rate: 0,
			JobID: 0,
			JobName: String,
			JobCount: 0,
			Locked: False,
			LockedByAgentId: 0,
			LockedTimestamp: 0001-01-01,
			Initials: String,
			ContactCategoryName: String,
			SMSOptIn: False
		}
	]
}