Required role: | Consumer |
POST | /business/next-to-claim |
---|
"use strict";
/** @typedef {'AuthenticateWithVipps'|'CreatePassword'|'AcceptBusinessTermsOfService'|'Claim'|'Completed'} */
export var NextClaimStep;
(function (NextClaimStep) {
NextClaimStep["AuthenticateWithVipps"] = "AuthenticateWithVipps"
NextClaimStep["CreatePassword"] = "CreatePassword"
NextClaimStep["AcceptBusinessTermsOfService"] = "AcceptBusinessTermsOfService"
NextClaimStep["Claim"] = "Claim"
NextClaimStep["Completed"] = "Completed"
})(NextClaimStep || (NextClaimStep = {}));
export class ClaimUserInfo {
/** @param {{firstName?:string,lastName?:string,email?:string,legalIdentityVerified?:boolean,phoneNumber?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
firstName;
/** @type {?string} */
lastName;
/** @type {string} */
email;
/** @type {?boolean} */
legalIdentityVerified;
/** @type {string} */
phoneNumber;
}
export class OpeningHour {
/** @param {{openAtHour?:number,openAtMinute?:number,closeAtHour?:number,closeAtMinute?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?number} */
openAtHour;
/** @type {?number} */
openAtMinute;
/** @type {?number} */
closeAtHour;
/** @type {?number} */
closeAtMinute;
}
export class WeeklyOpeningHours {
/** @param {{monday?:OpeningHour,tuesday?:OpeningHour,wednesday?:OpeningHour,thursday?:OpeningHour,friday?:OpeningHour,saturday?:OpeningHour,sunday?:OpeningHour}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?OpeningHour} */
monday;
/** @type {?OpeningHour} */
tuesday;
/** @type {?OpeningHour} */
wednesday;
/** @type {?OpeningHour} */
thursday;
/** @type {?OpeningHour} */
friday;
/** @type {?OpeningHour} */
saturday;
/** @type {?OpeningHour} */
sunday;
}
export class OpeningHours {
/** @param {{weekly?:WeeklyOpeningHours}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {WeeklyOpeningHours} */
weekly;
}
/** @typedef {'Mall'|'Regular'} */
export var PlaceType;
(function (PlaceType) {
PlaceType["Mall"] = "Mall"
PlaceType["Regular"] = "Regular"
})(PlaceType || (PlaceType = {}));
/** @typedef {'Value'|'Medium'|'High'|'FineDining'} */
export var PriceMainDish;
(function (PriceMainDish) {
PriceMainDish["Value"] = "Value"
PriceMainDish["Medium"] = "Medium"
PriceMainDish["High"] = "High"
PriceMainDish["FineDining"] = "FineDining"
})(PriceMainDish || (PriceMainDish = {}));
export class PriceMainDishApiDto {
/** @param {{title?:string,slug?:PriceMainDish}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
title;
/** @type {?PriceMainDish} */
slug;
}
export class TimeZoneDto {
/** @param {{baseUtcOffset?:string,daylightName?:string,displayName?:string,id?:string,standardName?:string,supportsDaylightSavingTime?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
baseUtcOffset;
/** @type {string} */
daylightName;
/** @type {string} */
displayName;
/** @type {string} */
id;
/** @type {string} */
standardName;
/** @type {?boolean} */
supportsDaylightSavingTime;
}
export class PlaceContact {
/** @param {{phone?:string,email?:string,website?:string,webShop?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
phone;
/** @type {?string} */
email;
/** @type {?string} */
website;
/** @type {?string} */
webShop;
}
export class PlaceAddress {
/** @param {{street?:string,postalCode?:string,region?:string,countryCode?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
street;
/** @type {string} */
postalCode;
/** @type {string} */
region;
/** @type {string} */
countryCode;
}
export class CategoryTreeApiDto {
/** @param {{name?:string,slug?:string,absoluteSlug?:string,imageUrl?:string,allImageUrl?:string,iconImageUrl?:string,position?:number,children?:CategoryTreeApiDto[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
name;
/** @type {string} */
slug;
/** @type {string} */
absoluteSlug;
/** @type {?string} */
imageUrl;
/** @type {?string} */
allImageUrl;
/** @type {?string} */
iconImageUrl;
/** @type {?number} */
position;
/** @type {?CategoryTreeApiDto[]} */
children = [];
}
export class ImageUrls {
/** @param {{preview?:string,small?:string,medium?:string,large?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
preview;
/** @type {string} */
small;
/** @type {string} */
medium;
/** @type {string} */
large;
}
export class WearPriceProfileEsDto {
/** @param {{slug?:string,label?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
slug;
/** @type {string} */
label;
}
export class BrandApiDto {
/** @param {{name?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
name;
}
export class PlaceCustomBrandApiDto {
/** @param {{name?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
name;
}
export class PlaceSelectedBrandApiDto {
/** @param {{brand?:BrandApiDto,categoryAbsoluteSlugs?:string[],placeCustomBrand?:PlaceCustomBrandApiDto}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?BrandApiDto} */
brand;
/** @type {?string[]} */
categoryAbsoluteSlugs = [];
/** @type {?PlaceCustomBrandApiDto} */
placeCustomBrand;
}
export class PlaceBasicApiDto {
/** @param {{id?:number,guid?:string,overview?:string,name?:string,longitude?:number,latitude?:number,claimed?:boolean,organizationNumber?:string,countryCode?:string,openingHours?:OpeningHours,wheelchairAccessible?:boolean,wifi?:boolean,outdoorSeating?:boolean,saveFoodAndMoney?:boolean,placeType?:PlaceType,priceMainDish?:PriceMainDishApiDto,timeZoneDto?:TimeZoneDto,businessId?:number,contact?:PlaceContact,address?:PlaceAddress,categories?:CategoryTreeApiDto[],logoUrl?:ImageUrls,imageUrl?:ImageUrls,wearPriceProfiles?:WearPriceProfileEsDto[],brands?:PlaceSelectedBrandApiDto[],floor?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?number} */
id;
/** @type {?string} */
guid;
/** @type {?string} */
overview;
/** @type {string} */
name;
/** @type {?number} */
longitude;
/** @type {?number} */
latitude;
/** @type {?boolean} */
claimed;
/** @type {?string} */
organizationNumber;
/** @type {string} */
countryCode;
/** @type {?OpeningHours} */
openingHours;
/** @type {?boolean} */
wheelchairAccessible;
/** @type {?boolean} */
wifi;
/** @type {?boolean} */
outdoorSeating;
/** @type {?boolean} */
saveFoodAndMoney;
/** @type {?PlaceType} */
placeType;
/** @type {?PriceMainDishApiDto} */
priceMainDish;
/** @type {TimeZoneDto} */
timeZoneDto;
/** @type {?number} */
businessId;
/** @type {PlaceContact} */
contact;
/** @type {PlaceAddress} */
address;
/** @type {CategoryTreeApiDto[]} */
categories = [];
/** @type {?ImageUrls} */
logoUrl;
/** @type {?ImageUrls} */
imageUrl;
/** @type {WearPriceProfileEsDto[]} */
wearPriceProfiles = [];
/** @type {PlaceSelectedBrandApiDto[]} */
brands = [];
/** @type {?string} */
floor;
}
export class NextToClaimBusinessResponse {
/** @param {{nextStep?:NextClaimStep,user?:ClaimUserInfo,place?:PlaceBasicApiDto}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?NextClaimStep} */
nextStep;
/** @type {ClaimUserInfo} */
user;
/** @type {PlaceBasicApiDto} */
place;
}
export class NextToClaimBusinessRequest {
/** @param {{placeGuid?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
placeGuid;
}
JavaScript NextToClaimBusinessRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /business/next-to-claim HTTP/1.1
Host: unstable-consumer-api.brovs.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"placeGuid":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"nextStep":"AuthenticateWithVipps","user":{"firstName":"String","lastName":"String","email":"String","legalIdentityVerified":false,"phoneNumber":"String"},"place":{"id":0,"overview":"String","name":"String","longitude":0,"latitude":0,"claimed":false,"organizationNumber":"String","countryCode":"String","openingHours":{"weekly":{"monday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"tuesday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"wednesday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"thursday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"friday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"saturday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"sunday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0}}},"wheelchairAccessible":false,"wifi":false,"outdoorSeating":false,"saveFoodAndMoney":false,"placeType":"Mall","priceMainDish":{"title":"String","slug":"Value"},"timeZoneDto":{"baseUtcOffset":"PT0S","daylightName":"String","displayName":"String","id":"String","standardName":"String","supportsDaylightSavingTime":false},"businessId":0,"contact":{"phone":"String","email":"String","website":"String","webShop":"String"},"address":{"street":"String","postalCode":"String","region":"String","countryCode":"String"},"categories":[{"name":"String","slug":"String","absoluteSlug":"String","imageUrl":"String","allImageUrl":"String","iconImageUrl":"String","position":0,"children":[{"name":"String","slug":"String","absoluteSlug":"String","imageUrl":"String","allImageUrl":"String","iconImageUrl":"String","position":0,"children":[{"name":"String","slug":"String","absoluteSlug":"String","imageUrl":"String","allImageUrl":"String","iconImageUrl":"String","position":0}]}]}],"logoUrl":{"preview":"String","small":"String","medium":"String","large":"String"},"imageUrl":{"preview":"String","small":"String","medium":"String","large":"String"},"wearPriceProfiles":[{"slug":"String","label":"String"}],"brands":[{"brand":{"name":"String"},"categoryAbsoluteSlugs":["String"],"placeCustomBrand":{"name":"String"}}],"floor":"String"}}