Required role: | superadmin |
GET | /superadmin/company/inactive/report | Retrieves a report of inactive companies with their status. | This endpoint does not modify any data. |
---|
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
class InactivityAction(str, Enum):
ACTIVITY_REMINDER = 'ActivityReminder'
FINAL_WARNING = 'FinalWarning'
DELETE = 'Delete'
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class InactiveCompanyResult:
company_id: Optional[str] = None
last_activity_date: datetime.datetime = datetime.datetime(1, 1, 1)
last_activity_notification_date: datetime.datetime = datetime.datetime(1, 1, 1)
deletion_time: datetime.datetime = datetime.datetime(1, 1, 1)
action: Optional[InactivityAction] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class InactiveCompaniesResponse:
processed_companies: Optional[List[InactiveCompanyResult]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetInactiveCompaniesReport:
skip: Optional[int] = None
take: Optional[int] = None
Python GetInactiveCompaniesReport DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /superadmin/company/inactive/report HTTP/1.1 Host: testapi.bokamera.se Accept: text/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"ProcessedCompanies":[{"Action":"ActivityReminder"}]}