| Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
| GET | /voss/targetGroups | Get all Voss target groups | Returns every target group in the Voss tenant (all pages). |
|---|
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
Object = TypeVar('Object')
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TargetGroupConfigurationResult:
id: Optional[str] = None
organization_number_required: bool = False
organization_number_unique: bool = False
customer_number_required: bool = False
customer_address_required: bool = False
contact_person_required: bool = False
expiry_date_required: bool = False
exclude_customer_from_invoice_file: bool = False
class TypeEnum(str, Enum):
EXCLUSIVITY = 'Exclusivity'
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TargetGroupTagDto:
type: Optional[TypeEnum] = None
tag: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TargetGroupResult:
id: Optional[str] = None
name: Optional[str] = None
is_default: bool = False
external_id: Optional[str] = None
var_configuration: Optional[TargetGroupConfigurationResult] = None
tags: List[TargetGroupTagDto] = field(default_factory=list)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetVossTargetGroupsResponse:
total_count: int = 0
items: List[TargetGroupResult] = field(default_factory=list)
# @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetVossTargetGroups:
pass
Python GetVossTargetGroups 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.
GET /voss/targetGroups HTTP/1.1 Host: testapi.bokamera.se Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"TotalCount":0,"Items":[{}]}