BokaMera.API.Host

<back to all web services

UpdateIncentive

Requires Authentication
Requires the role:superadmin
The following routes are available for this service:
PUT/superadmin/incentive/{id}Update incentive
UpdateIncentive Parameters:
NameParameterData TypeRequiredDescription
IdpathintYesThe id of the incentive.
HeadingbodystringNo
StorageUrlbodystringNo
SuccessButtonTextbodystringNo
ActionIdbodyint?No
FrequencybodyIncentiveRecurrenceFrequencyNo
RecurrenceIntervalbodyuintNo
InitialDelayInSecondsbodyintNo
MaxDisplayCountbodyint?No
ValidFrombodyDateTimeOffsetNo
ValidTobodyDateTimeOffsetNo
CompanyIdsbodyList<Guid>No
CriteriabodyList<IncentiveCriteriaDto>No
PayloadbodystringNo
IncentiveRecurrenceFrequency Enum:
NameValue
OneTime1
Weekly2
Monthly3
IncentiveCriteriaDto Parameters:
NameParameterData TypeRequiredDescription
CriteriaTypeformCriteriaTypeNo
ValueformstringNo
InvertConditionformboolNo
CriteriaType Enum:
LicenseAvailability
SmsActivation
eAccountingActivation
CodeLockActivation
SocialActivation
OnlinePaymentActivation
FollowUpMessageActivation
RatingActivation
AdminIncentiveQueryResponse Parameters:
NameParameterData TypeRequiredDescription
FrequencyformIncentiveRecurrenceFrequencyNo
RecurrenceIntervalformuintNo
CreatedDateformDateTimeOffsetNo
ModifiedDateformDateTimeOffsetNo
CompanyIdsformList<Guid>No
CriteriaformList<IncentiveCriteria>No
ApplyToAllCompaniesformboolNo
CompanyIncentiveResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
HeadingformstringNo
StorageUrlformstringNo
SuccessButtonTextformstringNo
ActionIdformintNo
InitialDelayInSecondsformintNo
MaxDisplayCountformint?No
ValidFromformDateTimeOffsetNo
ValidToformDateTimeOffsetNo
ActionformIncentiveActionResponseNo
PayloadformstringNo
IncentiveActionResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
ActionTypeformIncentiveActionTypeNo
PageformstringNo
SegmentformstringNo
ElementformstringNo
LicenseTypeIdformint?No
SuggestedLicenseToUpgradeformLicenseTypeQueryResponseNo
IncentiveActionType Enum:
NameValue
Upgrade1
AddOn2
Information3
LicenseTypeQueryResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNoThe license type id
NameformstringNoThe license type name
DescriptionformstringNoThe license type description
IsExtraLicenseOptionformboolNoIf the license type is not a standard license but instead an extra license option. An example would be sending new letter license.
PeriodOfNoticeDaysformintNoThe period of notice for the license in days.
ItemsformList<LicenseItemsResponse>NoThe license items for the license type
PricesformList<LicensePriceResponse>NoThe license prices in each country for the license type
LicenseItemsResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
NameformstringNo
AllowedItemsformintNo
LicensePriceResponse Parameters:
NameParameterData TypeRequiredDescription
LicenseTypeIdformintNo
CountryIdformstringNo
PriceformintNo
CountryformCountryNo
LicensePlanIdformintNo
Country Parameters:
NameParameterData TypeRequiredDescription
CurrencyIdformstringNo
CurrencyInfoformCurrencyNo
NameformstringYes
CultureformstringNo
TimeZoneformstringNo
ModifiedDateformDateTimeOffset?No
IdformstringYes
Currency Parameters:
NameParameterData TypeRequiredDescription
NameformstringYes
CurrencySignformstringYes
ActiveformboolYes
ModifiedDateformDateTimeOffset?No
IdformstringYes
IncentiveCriteria Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
IncentiveIdformintNo
CriteriaTypeformCriteriaTypeNo
ValueformstringNo
InvertConditionformboolNo
CreatedDateformDateTimeOffsetNo

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

HTTP + XML

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

PUT /superadmin/incentive/{id} HTTP/1.1 
Host: testapi.bokamera.se 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<UpdateIncentive xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <ActionId>0</ActionId>
  <CompanyIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:guid>00000000-0000-0000-0000-000000000000</d2p1:guid>
  </CompanyIds>
  <Criteria>
    <IncentiveCriteriaDto>
      <CriteriaType>LicenseAvailability</CriteriaType>
      <InvertCondition>false</InvertCondition>
      <Value>String</Value>
    </IncentiveCriteriaDto>
  </Criteria>
  <Frequency>OneTime</Frequency>
  <Heading>String</Heading>
  <Id>0</Id>
  <InitialDelayInSeconds>0</InitialDelayInSeconds>
  <MaxDisplayCount>0</MaxDisplayCount>
  <Payload>String</Payload>
  <RecurrenceInterval>0</RecurrenceInterval>
  <StorageUrl>String</StorageUrl>
  <SuccessButtonText>String</SuccessButtonText>
  <ValidFrom xmlns:d2p1="http://schemas.datacontract.org/2004/07/System">
    <d2p1:DateTime>0001-01-01T00:00:00Z</d2p1:DateTime>
    <d2p1:OffsetMinutes>0</d2p1:OffsetMinutes>
  </ValidFrom>
  <ValidTo xmlns:d2p1="http://schemas.datacontract.org/2004/07/System">
    <d2p1:DateTime>0001-01-01T00:00:00Z</d2p1:DateTime>
    <d2p1:OffsetMinutes>0</d2p1:OffsetMinutes>
  </ValidTo>
</UpdateIncentive>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<AdminIncentiveQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <Action>
    <ActionType>Upgrade</ActionType>
    <Element>String</Element>
    <Id>0</Id>
    <LicenseTypeId>0</LicenseTypeId>
    <Page>String</Page>
    <Segment>String</Segment>
    <SuggestedLicenseToUpgrade>
      <Description>String</Description>
      <Id>0</Id>
      <IsExtraLicenseOption>false</IsExtraLicenseOption>
      <Items>
        <LicenseItemsResponse>
          <AllowedItems>0</AllowedItems>
          <Id>0</Id>
          <Name>String</Name>
        </LicenseItemsResponse>
      </Items>
      <Name>String</Name>
      <PeriodOfNoticeDays>0</PeriodOfNoticeDays>
      <Prices>
        <LicensePriceResponse>
          <Country xmlns:d6p1="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Db">
            <d6p1:Culture>String</d6p1:Culture>
            <d6p1:CurrencyId>String</d6p1:CurrencyId>
            <d6p1:CurrencyInfo>
              <d6p1:Active>false</d6p1:Active>
              <d6p1:CurrencySign>String</d6p1:CurrencySign>
              <d6p1:Id>String</d6p1:Id>
              <d6p1:ModifiedDate xmlns:d8p1="http://schemas.datacontract.org/2004/07/System">
                <d8p1:DateTime>0001-01-01T00:00:00Z</d8p1:DateTime>
                <d8p1:OffsetMinutes>0</d8p1:OffsetMinutes>
              </d6p1:ModifiedDate>
              <d6p1:Name>String</d6p1:Name>
            </d6p1:CurrencyInfo>
            <d6p1:Id>String</d6p1:Id>
            <d6p1:ModifiedDate xmlns:d7p1="http://schemas.datacontract.org/2004/07/System">
              <d7p1:DateTime>0001-01-01T00:00:00Z</d7p1:DateTime>
              <d7p1:OffsetMinutes>0</d7p1:OffsetMinutes>
            </d6p1:ModifiedDate>
            <d6p1:Name>String</d6p1:Name>
            <d6p1:TimeZone>String</d6p1:TimeZone>
          </Country>
          <CountryId>String</CountryId>
          <LicensePlanId>0</LicensePlanId>
          <LicenseTypeId>0</LicenseTypeId>
          <Price>0</Price>
        </LicensePriceResponse>
      </Prices>
    </SuggestedLicenseToUpgrade>
  </Action>
  <ActionId>0</ActionId>
  <Heading>String</Heading>
  <Id>0</Id>
  <InitialDelayInSeconds>0</InitialDelayInSeconds>
  <MaxDisplayCount>0</MaxDisplayCount>
  <Payload>String</Payload>
  <StorageUrl>String</StorageUrl>
  <SuccessButtonText>String</SuccessButtonText>
  <ValidFrom xmlns:d2p1="http://schemas.datacontract.org/2004/07/System">
    <d2p1:DateTime>0001-01-01T00:00:00Z</d2p1:DateTime>
    <d2p1:OffsetMinutes>0</d2p1:OffsetMinutes>
  </ValidFrom>
  <ValidTo xmlns:d2p1="http://schemas.datacontract.org/2004/07/System">
    <d2p1:DateTime>0001-01-01T00:00:00Z</d2p1:DateTime>
    <d2p1:OffsetMinutes>0</d2p1:OffsetMinutes>
  </ValidTo>
  <ApplyToAllCompanies>false</ApplyToAllCompanies>
  <CompanyIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:guid>00000000-0000-0000-0000-000000000000</d2p1:guid>
  </CompanyIds>
  <CreatedDate xmlns:d2p1="http://schemas.datacontract.org/2004/07/System">
    <d2p1:DateTime>0001-01-01T00:00:00Z</d2p1:DateTime>
    <d2p1:OffsetMinutes>0</d2p1:OffsetMinutes>
  </CreatedDate>
  <Criteria xmlns:d2p1="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Db.Incentive">
    <d2p1:IncentiveCriteria>
      <d2p1:CreatedDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
        <d4p1:DateTime>0001-01-01T00:00:00Z</d4p1:DateTime>
        <d4p1:OffsetMinutes>0</d4p1:OffsetMinutes>
      </d2p1:CreatedDate>
      <d2p1:CriteriaType>LicenseAvailability</d2p1:CriteriaType>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:IncentiveId>0</d2p1:IncentiveId>
      <d2p1:InvertCondition>false</d2p1:InvertCondition>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:IncentiveCriteria>
  </Criteria>
  <Frequency>OneTime</Frequency>
  <ModifiedDate xmlns:d2p1="http://schemas.datacontract.org/2004/07/System">
    <d2p1:DateTime>0001-01-01T00:00:00Z</d2p1:DateTime>
    <d2p1:OffsetMinutes>0</d2p1:OffsetMinutes>
  </ModifiedDate>
  <RecurrenceInterval>0</RecurrenceInterval>
</AdminIncentiveQueryResponse>