| Requires the role: | Admin | Requires the permission: | ReadData |
| POST | /Support/CustomerSearch |
|---|
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 SupportCustomerHit:
phone: Optional[str] = None
email: Optional[str] = None
name: Optional[str] = None
ticket_count: Optional[int] = None
owner_card_count: Optional[int] = None
webshop_order_count: Optional[int] = None
gift_card_count: Optional[int] = None
shared_link_count: Optional[int] = None
last_activity_utc: Optional[datetime.datetime] = None
sellers: Optional[List[str]] = None
matched_by: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SupportCustomerSearchResult:
hits: Optional[List[SupportCustomerHit]] = None
term_kind: Optional[str] = None
normalized_term: Optional[str] = None
warnings: Optional[List[str]] = None
status_code: Optional[int] = None
message: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SupportCustomerSearchRequest:
term: Optional[str] = None
limit: Optional[int] = None
Python SupportCustomerSearchRequest 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 /Support/CustomerSearch HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
term: String,
limit: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
hits:
[
{
phone: String,
email: String,
name: String,
ticketCount: 0,
ownerCardCount: 0,
webshopOrderCount: 0,
giftCardCount: 0,
sharedLinkCount: 0,
lastActivityUtc: 0001-01-01,
sellers:
[
String
],
matchedBy: String
}
],
termKind: String,
normalizedTerm: String,
warnings:
[
String
],
statusCode: 0,
message: String
}