All Verbs | /content/{Country}/{Lang}/{Section} | ||
---|---|---|---|
All Verbs | /content/{Country}/{Lang}/{Section}/{SubSection} |
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 Entity(IEntity):
id: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Content(Entity):
section: Optional[str] = None
item_id: Optional[str] = None
item_code: Optional[str] = None
country: Optional[str] = None
lang: Optional[str] = None
app: Optional[str] = None
company_id: Optional[str] = None
company: Optional[str] = None
elements: Optional[Dict[str, str]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SectionContentGetReq:
country: Optional[str] = None
lang: Optional[str] = None
section: Optional[str] = None
sub_section: Optional[str] = None
environment: Optional[str] = None
Python SectionContentGetReq DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /content/{Country}/{Lang}/{Section} HTTP/1.1
Host: hcbtas-q-albamfs-api.azurewebsites.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
country: String,
lang: String,
section: String,
subSection: String,
environment: String
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { section: String, itemId: String, itemCode: String, country: String, lang: String, app: String, companyId: String, company: String, elements: { String: String }, id: String }