ServiceStack Home (Live)

<back to all web services

AccountSettings

Requires Authentication
The following routes are available for this service:
All Verbs/account/settings
GET POST/AccountSettings
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 AccountSettings(IPost):
    display_name: Optional[str] = None
    first_name: Optional[str] = None
    last_name: Optional[str] = None
    company: Optional[str] = None
    phone_number: Optional[str] = None
    show_card: bool = False
    brand: Optional[str] = None
    last4: Optional[str] = None
    card_number: Optional[str] = None
    cvc: Optional[str] = None
    exp_month: int = 0
    exp_year: int = 0

Python AccountSettings 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

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /account/settings HTTP/1.1 
Host: account.servicestack.net 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"displayName":"String","firstName":"String","lastName":"String","company":"String","phoneNumber":"String","showCard":false,"brand":"String","last4":"String","cardNumber":"String","cvc":"String","expMonth":0,"expYear":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"displayName":"String","firstName":"String","lastName":"String","company":"String","phoneNumber":"String","showCard":false,"brand":"String","last4":"String","cardNumber":"String","cvc":"String","expMonth":0,"expYear":0}