BokaMera.API.Host

<back to all web services

GetVossPackage

The following routes are available for this service:
GET/voss/packagesget voss package
"use strict";
/** @typedef {'Draft'|'Staged'|'Published'|'Archived'|'Discarded'} */
export var PackageStatusEnum;
(function (PackageStatusEnum) {
    PackageStatusEnum["Draft"] = "Draft"
    PackageStatusEnum["Staged"] = "Staged"
    PackageStatusEnum["Published"] = "Published"
    PackageStatusEnum["Archived"] = "Archived"
    PackageStatusEnum["Discarded"] = "Discarded"
})(PackageStatusEnum || (PackageStatusEnum = {}));
/** @typedef {'Optional'|'Included'} */
export var ProductGroupTypeEnum;
(function (ProductGroupTypeEnum) {
    ProductGroupTypeEnum["Optional"] = "Optional"
    ProductGroupTypeEnum["Included"] = "Included"
})(ProductGroupTypeEnum || (ProductGroupTypeEnum = {}));
/** @typedef {'AtSubscriptionBillingPeriodEnd'|'AtBindingPeriodEnd'} */
export var TypeEnum;
(function (TypeEnum) {
    TypeEnum["AtSubscriptionBillingPeriodEnd"] = "AtSubscriptionBillingPeriodEnd"
    TypeEnum["AtBindingPeriodEnd"] = "AtBindingPeriodEnd"
})(TypeEnum || (TypeEnum = {}));
export class ProductGroupTagDto {
    /** @param {{type?:TypeEnum,tag?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {TypeEnum} */
    type;
    /** @type {string} */
    tag;
}
/** @typedef {'Main'|'Addon'|'License'|'Usage'} */
export var ProductTypeEnum;
(function (ProductTypeEnum) {
    ProductTypeEnum["Main"] = "Main"
    ProductTypeEnum["Addon"] = "Addon"
    ProductTypeEnum["License"] = "License"
    ProductTypeEnum["Usage"] = "Usage"
})(ProductTypeEnum || (ProductTypeEnum = {}));
/** @typedef {'Active'|'Terminated'} */
export var StatusEnum;
(function (StatusEnum) {
    StatusEnum["Active"] = "Active"
    StatusEnum["Terminated"] = "Terminated"
})(StatusEnum || (StatusEnum = {}));
export class PackageProductDto {
    /** @param {{type?:ProductTypeEnum,status?:StatusEnum,id?:string,name?:string,externalId?:string,articleNumber?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ProductTypeEnum} */
    type;
    /** @type {StatusEnum} */
    status;
    /** @type {string} */
    id;
    /** @type {string} */
    name;
    /** @type {string} */
    externalId;
    /** @type {string} */
    articleNumber;
}
export class PackageProductGroupDto {
    /** @param {{productGroupType?:ProductGroupTypeEnum,id?:string,name?:string,externalId?:string,tags?:ProductGroupTagDto[],products?:PackageProductDto[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ProductGroupTypeEnum} */
    productGroupType;
    /** @type {string} */
    id;
    /** @type {string} */
    name;
    /** @type {string} */
    externalId;
    /** @type {ProductGroupTagDto[]} */
    tags = [];
    /** @type {PackageProductDto[]} */
    products = [];
}
export class PackageTierDto {
    /** @param {{id?:string,name?:string,externalId?:string,productGroups?:PackageProductGroupDto[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    name;
    /** @type {string} */
    externalId;
    /** @type {PackageProductGroupDto[]} */
    productGroups = [];
}
/** @typedef {'Renew'|'Terminate'} */
export var PeriodEndActionEnum;
(function (PeriodEndActionEnum) {
    PeriodEndActionEnum["Renew"] = "Renew"
    PeriodEndActionEnum["Terminate"] = "Terminate"
})(PeriodEndActionEnum || (PeriodEndActionEnum = {}));
/** @typedef {'Day'|'Month'|'Year'} */
export var UnitEnum;
(function (UnitEnum) {
    UnitEnum["Day"] = "Day"
    UnitEnum["Month"] = "Month"
    UnitEnum["Year"] = "Year"
})(UnitEnum || (UnitEnum = {}));
export class TimeLengthDto {
    /** @param {{unit?:UnitEnum,value?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {UnitEnum} */
    unit;
    /** @type {number} */
    value;
}
export class BindingPeriodCycleDto {
    /** @param {{periodEndAction?:PeriodEndActionEnum,length?:TimeLengthDto}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {PeriodEndActionEnum} */
    periodEndAction;
    /** @type {TimeLengthDto} */
    length;
}
/** @typedef {'PeriodCreated'|'PeriodStart'|'PeriodEnd'} */
export var PeriodAnchorEnum;
(function (PeriodAnchorEnum) {
    PeriodAnchorEnum["PeriodCreated"] = "PeriodCreated"
    PeriodAnchorEnum["PeriodStart"] = "PeriodStart"
    PeriodAnchorEnum["PeriodEnd"] = "PeriodEnd"
})(PeriodAnchorEnum || (PeriodAnchorEnum = {}));
export class PeriodDateOffsetDto {
    /** @param {{periodAnchor?:PeriodAnchorEnum,length?:TimeLengthDto,valueAnchor?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {PeriodAnchorEnum} */
    periodAnchor;
    /** @type {TimeLengthDto} */
    length;
    /** @type {?number} */
    valueAnchor;
}
export class BillingPeriodCycleDto {
    /** @param {{length?:TimeLengthDto,invoiceDateOffset?:PeriodDateOffsetDto,renewalDateOffset?:PeriodDateOffsetDto}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {TimeLengthDto} */
    length;
    /** @type {PeriodDateOffsetDto} */
    invoiceDateOffset;
    /** @type {PeriodDateOffsetDto} */
    renewalDateOffset;
}
export class PackagePlanDto {
    /** @param {{id?:string,name?:string,externalId?:string,bindingPeriodCycle?:BindingPeriodCycleDto,subscriptionBillingPeriodCycle?:BillingPeriodCycleDto,usageBillingPeriodCycle?:BillingPeriodCycleDto}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    name;
    /** @type {string} */
    externalId;
    /** @type {BindingPeriodCycleDto} */
    bindingPeriodCycle;
    /** @type {BillingPeriodCycleDto} */
    subscriptionBillingPeriodCycle;
    /** @type {BillingPeriodCycleDto} */
    usageBillingPeriodCycle;
}
/** @typedef {'UnitPricing'|'TierPricing'} */
export var PricingSchemeEnum;
(function (PricingSchemeEnum) {
    PricingSchemeEnum["UnitPricing"] = "UnitPricing"
    PricingSchemeEnum["TierPricing"] = "TierPricing"
})(PricingSchemeEnum || (PricingSchemeEnum = {}));
export class ProductTierPricingDto {
    /** @param {{index?:number,unitPrice?:number,flatPrice?:number,repeatEvery?:number,upperLimit?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    index;
    /** @type {number} */
    unitPrice;
    /** @type {number} */
    flatPrice;
    /** @type {?number} */
    repeatEvery;
    /** @type {?number} */
    upperLimit;
}
export class ProductPricingDto {
    /** @param {{pricingScheme?:PricingSchemeEnum,productId?:string,includedQuantity?:number,maxQuantity?:number,unitPrice?:number,tierPricing?:ProductTierPricingDto[],articleNumber?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {PricingSchemeEnum} */
    pricingScheme;
    /** @type {string} */
    productId;
    /** @type {?number} */
    includedQuantity;
    /** @type {?number} */
    maxQuantity;
    /** @type {?number} */
    unitPrice;
    /** @type {ProductTierPricingDto[]} */
    tierPricing = [];
    /** @type {string} */
    articleNumber;
}
export class ProductGroupPricingDto {
    /** @param {{productGroupId?:string,articleNumber?:string,price?:number,productPricings?:ProductPricingDto[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    productGroupId;
    /** @type {string} */
    articleNumber;
    /** @type {number} */
    price;
    /** @type {ProductPricingDto[]} */
    productPricings = [];
}
export class PackageChargePlanDto {
    /** @param {{id?:string,tierId?:string,planId?:string,productGroupPricings?:ProductGroupPricingDto[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    tierId;
    /** @type {string} */
    planId;
    /** @type {ProductGroupPricingDto[]} */
    productGroupPricings = [];
}
export class PackageSalesChannelDto {
    /** @param {{id?:string,name?:string,description?:string,validFrom?:string,validTo?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    name;
    /** @type {string} */
    description;
    /** @type {?string} */
    validFrom;
    /** @type {?string} */
    validTo;
}
export class PackageTargetGroupDto {
    /** @param {{id?:string,name?:string,isDefault?:boolean,externalId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    name;
    /** @type {boolean} */
    isDefault;
    /** @type {string} */
    externalId;
}
export class PackageScheduledChangeResultDto {
    /** @param {{status?:PackageStatusEnum,name?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?PackageStatusEnum} */
    status;
    /** @type {string} */
    name;
}
export class PackageScheduledChangeResult {
    /** @param {{status?:StatusEnum,id?:string,versionId?:string,package?:PackageScheduledChangeResultDto,scheduledDate?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {StatusEnum} */
    status;
    /** @type {string} */
    id;
    /** @type {string} */
    versionId;
    /** @type {PackageScheduledChangeResultDto} */
    package;
    /** @type {string} */
    scheduledDate;
}
export class PackageResult {
    /** @param {{status?:PackageStatusEnum,id?:string,versionId?:string,sourceVersionId?:string,name?:string,externalId?:string,tiers?:PackageTierDto[],plans?:PackagePlanDto[],chargePlans?:PackageChargePlanDto[],salesChannels?:PackageSalesChannelDto[],targetGroups?:PackageTargetGroupDto[],scheduledChanges?:PackageScheduledChangeResult[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {PackageStatusEnum} */
    status;
    /** @type {string} */
    id;
    /** @type {string} */
    versionId;
    /** @type {?string} */
    sourceVersionId;
    /** @type {string} */
    name;
    /** @type {string} */
    externalId;
    /** @type {PackageTierDto[]} */
    tiers = [];
    /** @type {PackagePlanDto[]} */
    plans = [];
    /** @type {PackageChargePlanDto[]} */
    chargePlans = [];
    /** @type {PackageSalesChannelDto[]} */
    salesChannels = [];
    /** @type {PackageTargetGroupDto[]} */
    targetGroups = [];
    /** @type {PackageScheduledChangeResult[]} */
    scheduledChanges = [];
}
export class GetVossPackage {
    /** @param {{PackageId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {?string}
     * @description The package id; if not passed the configured BokaMera package will be used. */
    PackageId;
}

JavaScript GetVossPackage DTOs

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 /voss/packages HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"status":"Draft","sourceVersionId":"00000000-0000-0000-0000-000000000000","name":"String","externalId":"String","tiers":[{}],"plans":[{}],"chargePlans":[{}],"salesChannels":[{}],"targetGroups":[{}],"scheduledChanges":[{}]}