| POST,OPTIONS | /v1/forms/office/drafts/{SubmissionUID}/submit |
|---|
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 FormFillReceiptLine:
channel: Optional[str] = None
to: Optional[str] = None
outcome: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FormFillFieldError:
k: Optional[str] = None
msg: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FormOfficeSubmitResponse:
state: Optional[str] = None
number: Optional[str] = None
submission_u_i_d: Optional[str] = None
approved: bool = False
waiting: bool = False
receipt: List[FormFillReceiptLine] = field(default_factory=list)
errors: List[FormFillFieldError] = field(default_factory=list)
response_status: Optional[ResponseStatus] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FormOfficeSubmitRequest:
submission_u_i_d: Optional[str] = None
answers_json: Optional[str] = None
Python FormOfficeSubmitRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/forms/office/drafts/{SubmissionUID}/submit HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"SubmissionUID":"00000000000000000000000000000000","AnswersJson":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"State":"String","Number":"String","SubmissionUID":"String","Approved":false,"Waiting":false,"Receipt":[{"Channel":"String","To":"String","Outcome":"String"}],"Errors":[{"K":"String","Msg":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}