Trendsic Platform Service

<back to all web services

FormFillAppRequest

The following routes are available for this service:
GET/v1/formfill/{TenantSlug}/{FormSlug}
<?php namespace dtos;

use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};


class FormFillAppResponse implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $AppJson=null,
        /** @var string|null */
        public ?string $TenantName=null,
        /** @var string|null */
        public ?string $Today=null,
        /** @var string|null */
        public ?string $Who=null,
        /** @var string|null */
        public ?string $PrefillJson=null,
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['AppJson'])) $this->AppJson = $o['AppJson'];
        if (isset($o['TenantName'])) $this->TenantName = $o['TenantName'];
        if (isset($o['Today'])) $this->Today = $o['Today'];
        if (isset($o['Who'])) $this->Who = $o['Who'];
        if (isset($o['PrefillJson'])) $this->PrefillJson = $o['PrefillJson'];
        if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->AppJson)) $o['AppJson'] = $this->AppJson;
        if (isset($this->TenantName)) $o['TenantName'] = $this->TenantName;
        if (isset($this->Today)) $o['Today'] = $this->Today;
        if (isset($this->Who)) $o['Who'] = $this->Who;
        if (isset($this->PrefillJson)) $o['PrefillJson'] = $this->PrefillJson;
        if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
        return empty($o) ? new class(){} : $o;
    }
}

class FormFillAppRequest implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $TenantSlug=null,
        /** @var string|null */
        public ?string $FormSlug=null,
        /** @var string|null */
        public ?string $Invite=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['TenantSlug'])) $this->TenantSlug = $o['TenantSlug'];
        if (isset($o['FormSlug'])) $this->FormSlug = $o['FormSlug'];
        if (isset($o['Invite'])) $this->Invite = $o['Invite'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->TenantSlug)) $o['TenantSlug'] = $this->TenantSlug;
        if (isset($this->FormSlug)) $o['FormSlug'] = $this->FormSlug;
        if (isset($this->Invite)) $o['Invite'] = $this->Invite;
        return empty($o) ? new class(){} : $o;
    }
}

PHP FormFillAppRequest 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/formfill/{TenantSlug}/{FormSlug} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	AppJson: String,
	TenantName: String,
	Today: String,
	Who: String,
	PrefillJson: String,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}