Trendsic Platform Service

<back to all web services

FormServiceLinkSetRequest

Requires Authentication
The following routes are available for this service:
PUT/v1/forms/service-links/{LineId}
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 FormServiceLinkView:
    line_id: Optional[str] = None
    service_name: Optional[str] = None
    branch_name: Optional[str] = None
    sends_questionnaire: bool = False
    form_u_i_d: Optional[str] = None
    form_name: Optional[str] = None
    mine: bool = False
    live: bool = False
    note: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FormServiceLinkForm:
    form_u_i_d: Optional[str] = None
    name: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FormServiceLinksResponse:
    services: List[FormServiceLinkView] = field(default_factory=list)
    forms: List[FormServiceLinkForm] = field(default_factory=list)
    sentence: Optional[str] = None
    response_status: Optional[ResponseStatus] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FormServiceLinkSetRequest:
    line_id: Optional[str] = None
    form_u_i_d: Optional[str] = None
    for_form_u_i_d: Optional[str] = None

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

PUT /v1/forms/service-links/{LineId} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	LineId: 00000000000000000000000000000000,
	FormUID: 00000000000000000000000000000000,
	ForFormUID: 00000000000000000000000000000000
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Services: 
	[
		{
			LineId: 00000000000000000000000000000000,
			ServiceName: String,
			BranchName: String,
			SendsQuestionnaire: False,
			FormUID: 00000000000000000000000000000000,
			FormName: String,
			Mine: False,
			Live: False,
			Note: String
		}
	],
	Forms: 
	[
		{
			FormUID: 00000000000000000000000000000000,
			Name: String
		}
	],
	Sentence: String,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}