| POST | /consumerinitiation |
|---|
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 ConsumerInitiation(IPost):
# @ApiMember(Description="First name of the consumer", IsRequired=true)
first_name: Optional[str] = None
"""
First name of the consumer
"""
# @ApiMember(Description="Last name of the consumer", IsRequired=true)
last_name: Optional[str] = None
"""
Last name of the consumer
"""
# @ApiMember(Description="Program name", IsRequired=true)
program: Optional[str] = None
"""
Program name
"""
# @ApiMember(Description="Company name", IsRequired=true)
company_name: Optional[str] = None
"""
Company name
"""
# @ApiMember(Description="Mobile phone number")
mobile_number: Optional[str] = None
"""
Mobile phone number
"""
# @ApiMember(Description="Preferred email address", IsRequired=true)
preferred_email: Optional[str] = None
"""
Preferred email address
"""
# @ApiMember(Description="Current work location state")
current_work_state: Optional[str] = None
"""
Current work location state
"""
# @ApiMember(Description="Current work location country")
current_work_country: Optional[str] = None
"""
Current work location country
"""
# @ApiMember(Description="Destination work location state")
destination_work_state: Optional[str] = None
"""
Destination work location state
"""
# @ApiMember(Description="Destination work location country")
destination_work_country: Optional[str] = None
"""
Destination work location country
"""
# @ApiMember(Description="Preferred work location state")
preferred_work_state: Optional[str] = None
"""
Preferred work location state
"""
# @ApiMember(Description="Preferred work location country")
preferred_work_country: Optional[str] = None
"""
Preferred work location country
"""
Python ConsumerInitiation DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /consumerinitiation HTTP/1.1
Host: initiation-test.sirva.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"FirstName":"String","LastName":"String","Program":"String","CompanyName":"String","MobileNumber":"String","PreferredEmail":"String","CurrentWorkState":"String","CurrentWorkCountry":"String","DestinationWorkState":"String","DestinationWorkCountry":"String","PreferredWorkState":"String","PreferredWorkCountry":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{}