BokaMera.API.Host

<back to all web services

DeleteServicePrice

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
DELETE/services/prices/{Id}Delete a priceDelete a price on a service
"use strict";
export class DayOfWeekDto {
    /** @param {{DayOfWeekId?:number,DotNetDayOfWeekId?:number,DayOfWeek?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    DayOfWeekId;
    /** @type {number} */
    DotNetDayOfWeekId;
    /** @type {string} */
    DayOfWeek;
}
export class GroupBookingSettings {
    /** @param {{Active?:boolean,Min?:number,Max?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {boolean} */
    Active;
    /** @type {number} */
    Min;
    /** @type {number} */
    Max;
}
export class MultipleResourceSettings {
    /** @param {{Active?:boolean,Min?:number,Max?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {boolean} */
    Active;
    /** @type {number} */
    Min;
    /** @type {number} */
    Max;
}
export class ServiceInfoResponse {
    /** @param {{Id?:number,Name?:string,Description?:string,ImageUrl?:string,LengthInMinutes?:number,MaxNumberOfSpotsPerBooking?:number,GroupBooking?:GroupBookingSettings,MultipleResource?:MultipleResourceSettings,IsGroupBooking?:boolean,IsPaymentEnabled?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    Id;
    /** @type {string} */
    Name;
    /** @type {string} */
    Description;
    /** @type {string} */
    ImageUrl;
    /** @type {?number} */
    LengthInMinutes;
    /** @type {number} */
    MaxNumberOfSpotsPerBooking;
    /** @type {GroupBookingSettings} */
    GroupBooking;
    /** @type {MultipleResourceSettings} */
    MultipleResource;
    /** @type {boolean} */
    IsGroupBooking;
    /** @type {boolean} */
    IsPaymentEnabled;
}
export class ServicePriceResponse {
    /** @param {{CompanyId?:string,Id?:number,ServiceId?:number,Price?:number,CalculationTypeId?:number,CurrencyId?:string,PriceSign?:string,VAT?:number,Category?:string,PriceText?:string,From?:string,To?:string,DaysOfWeek?:DayOfWeekDto[],FromTime?:string,ToTime?:string,Service?:ServiceInfoResponse,IsTimeSpecific?:boolean,IsDaysOfWeekSpecific?:boolean,IsWeighted?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description The company id */
    CompanyId;
    /**
     * @type {number}
     * @description The price id */
    Id;
    /**
     * @type {number}
     * @description The service id */
    ServiceId;
    /**
     * @type {number}
     * @description The price */
    Price;
    /**
     * @type {number}
     * @description The price calculation type id, 1 = Normal, price is for the service total duration, 2 = Price is per minute, 3 = Price is per hour, 4= Price is per day */
    CalculationTypeId;
    /**
     * @type {string}
     * @description The price currency */
    CurrencyId;
    /**
     * @type {string}
     * @description The price sign */
    PriceSign;
    /**
     * @type {number}
     * @description The price VAT in percent */
    VAT;
    /**
     * @type {string}
     * @description The price category if price has a category */
    Category;
    /**
     * @type {string}
     * @description The price text to display */
    PriceText;
    /**
     * @type {string}
     * @description The valid from date for the price. */
    From;
    /**
     * @type {string}
     * @description The valid to date for the price. */
    To;
    /**
     * @type {DayOfWeekDto[]}
     * @description If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update. */
    DaysOfWeek;
    /**
     * @type {?string}
     * @description If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update. */
    FromTime;
    /**
     * @type {?string}
     * @description If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters. */
    ToTime;
    /** @type {ServiceInfoResponse} */
    Service;
    /**
     * @type {boolean}
     * @description If the price is only valid for a specific time span */
    IsTimeSpecific;
    /**
     * @type {boolean}
     * @description If the price is only valid for specific days of week */
    IsDaysOfWeekSpecific;
    /**
     * @type {boolean}
     * @description If the price is Weighted */
    IsWeighted;
}
export class DeleteServicePrice {
    /** @param {{CompanyId?:string,Id?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {?string}
     * @description The company id, if empty will use the company id for the user you are logged in with. */
    CompanyId;
    /**
     * @type {number}
     * @description The price id */
    Id;
}

JavaScript DeleteServicePrice DTOs

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.

DELETE /services/prices/{Id} HTTP/1.1 
Host: testapi.bokamera.se 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ServicePriceResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <CalculationTypeId>0</CalculationTypeId>
  <Category>String</Category>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <CurrencyId>String</CurrencyId>
  <DaysOfWeek>
    <DayOfWeekDto>
      <DayOfWeek>String</DayOfWeek>
      <DayOfWeekId>0</DayOfWeekId>
      <DotNetDayOfWeekId>0</DotNetDayOfWeekId>
    </DayOfWeekDto>
  </DaysOfWeek>
  <From>0001-01-01T00:00:00</From>
  <FromTime>PT0S</FromTime>
  <Id>0</Id>
  <IsDaysOfWeekSpecific>false</IsDaysOfWeekSpecific>
  <IsTimeSpecific>false</IsTimeSpecific>
  <IsWeighted>false</IsWeighted>
  <Price>0</Price>
  <PriceSign>String</PriceSign>
  <PriceText>String</PriceText>
  <Service>
    <Description>String</Description>
    <GroupBooking>
      <Active>false</Active>
      <Max>0</Max>
      <Min>0</Min>
    </GroupBooking>
    <Id>0</Id>
    <ImageUrl i:nil="true" />
    <IsGroupBooking>false</IsGroupBooking>
    <IsPaymentEnabled>false</IsPaymentEnabled>
    <LengthInMinutes>0</LengthInMinutes>
    <MaxNumberOfSpotsPerBooking>0</MaxNumberOfSpotsPerBooking>
    <MultipleResource>
      <Active>false</Active>
      <Max>0</Max>
      <Min>0</Min>
    </MultipleResource>
    <Name>String</Name>
  </Service>
  <ServiceId>0</ServiceId>
  <To>0001-01-01T00:00:00</To>
  <ToTime>PT0S</ToTime>
  <VAT>0</VAT>
</ServicePriceResponse>