BokaMera.API.Host

<back to all web services

AdminIncentivesQuery

Requires Authentication
Requires the role:superadmin
The following routes are available for this service:
GET/superadmin/incentives/Query incentives
AdminIncentivesQuery Parameters:
NameParameterData TypeRequiredDescription
Idqueryint?No
CompanyIdqueryGuid?No
ValidFromqueryDate?No
ValidToqueryDate?No
ActionIdqueryint?No
Activequerybool?No
IncludeCriteriaqueryboolNo
IncludeCompaniesqueryboolNo
IncludeActionqueryboolNo
QueryBase Parameters:
NameParameterData TypeRequiredDescription
SkipqueryintNoSkip over a given number of elements in a sequence and then return the remainder. Use this when you need paging.

Example:
?skip=10&orderBy=Id
TakequeryintNoReturn a given number of elements in a sequence and then skip over the remainder. Use this when you need paging.

Example:
?take=20
OrderByquerystringNoComma separated list of fields to order by. Prefix the field name with a minus if you wan't to invert the sort for that field.

Example:
?orderBy=Id,-Age,FirstName
OrderByDescquerystringNoComma separated list of fields to order by in descending order. Prefix the field name with a minus if you wan't to invert the sort for that field.

Example:
?orderByDesc=Id,-Age,FirstName
IncludequerystringNoInclude any of the aggregates AVG, COUNT, FIRST, LAST, MAX, MIN, SUM in your result set. The results will be returned in the meta field.

Example:
?include=COUNT(*) as Total

or multiple fields with
?include=Count(*) Total, Min(Age), AVG(Age) AverageAge

or unique with
?include=COUNT(DISTINCT LivingStatus) as UniqueStatus
FieldsformstringNo
MetaformDictionary<string, string>No
Incentive Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
HeadingformstringNo
StorageUrlformstringNo
SuccessButtonTextformstringNo
ActiveformboolNo
ActionIdformintNo
FrequencyformIncentiveRecurrenceFrequencyNo
RecurrenceIntervalformuintNo
InitialDelayInSecondsformintNo
MaxDisplayCountformint?No
ValidFromformDateTimeOffsetNo
ValidToformDateTimeOffsetNo
CreatedDateformDateTimeOffsetNo
ModifiedDateformDateTimeOffset?No
AppliesToAllCompaniesformboolNo
PayloadformstringNo
InitialDeferredDaysformintNo
CompaniesformList<IncentiveCompanyRelation>No
CriteriaformList<IncentiveCriteria>No
ActionformIncentiveActionNo
IncentiveRecurrenceFrequency Enum:
NameValue
OneTime1
Weekly2
Monthly3
IncentiveCompanyRelation Parameters:
NameParameterData TypeRequiredDescription
IdformlongNo
CompanyIdformGuidNo
IncentiveIdformintNo
CreatedDateformDateTimeOffsetNo
IncentiveCriteria Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
IncentiveIdformintNo
CriteriaTypeformCriteriaTypeNo
ValueformstringNo
InvertConditionformboolNo
CreatedDateformDateTimeOffsetNo
CriteriaType Enum:
LicenseAvailability
SmsActivation
eAccountingActivation
CodeLockActivation
SocialActivation
OnlinePaymentActivation
FollowUpMessageActivation
RatingActivation
IncentiveAction Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
DescriptionformstringNo
ActionTypeformIncentiveActionTypeNo
PageformstringNo
SegmentformstringNo
ElementformstringNo
LicenseTypeIdformint?No
IncentiveActionType Enum:
NameValue
Upgrade1
AddOn2
Information3
QueryResponse<AccessKeyTypeResponse> Parameters:
NameParameterData TypeRequiredDescription
OffsetformintNo
TotalformintNo
ResultsformList<AccessKeyTypeResponse>No
MetaformDictionary<string, string>No
ResponseStatusformResponseStatusNo
AccessKeyTypeResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
KeyTypeformstringNo
DescriptionformstringNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /superadmin/incentives/ HTTP/1.1 
Host: api.bokamera.se 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Offset":0,"Total":0,"Results":[{"Offset":0,"Total":0,"Results":[{"Frequency":"OneTime","RecurrenceInterval":0,"CreatedDate":"0001-01-01T00:00:00.0000000+00:00","ModifiedDate":"0001-01-01T00:00:00.0000000+00:00","CompanyIds":["00000000-0000-0000-0000-000000000000"],"Criteria":[{"Id":0,"IncentiveId":0,"CriteriaType":"LicenseAvailability","Value":"String","InvertCondition":false,"CreatedDate":"0001-01-01T00:00:00.0000000+00:00"}],"ApplyToAllCompanies":false,"Id":0,"Heading":"String","StorageUrl":"String","SuccessButtonText":"String","ActionId":0,"InitialDelayInSeconds":0,"MaxDisplayCount":0,"ValidFrom":"0001-01-01T00:00:00.0000000+00:00","ValidTo":"0001-01-01T00:00:00.0000000+00:00","Action":{"Id":0,"Description":"String","ActionType":"Upgrade","Page":"String","Segment":"String","Element":"String","LicenseTypeId":0,"SuggestedLicenseToUpgrade":{"Id":0,"Name":"String","Description":"String","IsExtraLicenseOption":false,"PeriodOfNoticeDays":0,"Items":[{"Id":0,"Name":"String","AllowedItems":0}],"Prices":[{"Country":{"CurrencyId":"String","CurrencyInfo":{"Name":"String","CurrencySign":"String","Active":false,"ModifiedDate":"0001-01-01T00:00:00.0000000+00:00","Id":"String"},"Name":"String","Culture":"String","TimeZone":"String","ModifiedDate":"0001-01-01T00:00:00.0000000+00:00","Id":"String"},"MonthlyPayment":true,"LicenseTypeId":0,"CountryId":"String","Price":0,"ModifiedDate":"0001-01-01T00:00:00.0000000+00:00"}]}},"Payload":"String","InitialDeferredDays":0}],"Meta":{"String":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}],"Meta":{"String":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}