AlbaApi

<back to all web services

ContentElementSaveReq

Requires Authentication
The following routes are available for this service:
POST,PUT/content/element
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 ContentElementSaveReq:
    country: Optional[str] = None
    lang: Optional[str] = None
    section: Optional[str] = None
    element: Optional[str] = None
    item_id: Optional[str] = None
    content: Optional[str] = None
    status: Optional[str] = None

Python ContentElementSaveReq 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.

POST /content/element 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,
	element: String,
	itemId: String,
	content: String,
	status: 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
}