BokaMera.API.Host

<back to all web services

WidgetConfigurationQuery

Requires Authentication
The following routes are available for this service:
GET/widget/configurationList or get widget configurationsReturns widget configurations. If slug is provided, returns a single configuration matching that slug. Otherwise returns all configurations for the company.
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BokaMera.API.ServiceModel.Dtos;

namespace BokaMera.API.ServiceModel.Dtos
{
    public partial class AccessKeyTypeResponse
    {
        public virtual int Id { get; set; }
        public virtual string KeyType { get; set; }
        public virtual string Description { get; set; }
    }

    [ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)]
    [ValidateRequest("IsAuthenticated")]
    public partial class WidgetConfigurationQuery
        : ICompany
    {
        ///<summary>
        ///The company id, if empty will use the company id for the user you are logged in with.
        ///</summary>
        [ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")]
        public virtual Guid? CompanyId { get; set; }

        ///<summary>
        ///Optional slug to fetch a single configuration (e.g., 'hairsalon-001'). If provided, ignores other filter parameters.
        ///</summary>
        [ApiMember(Description="Optional slug to fetch a single configuration (e.g., 'hairsalon-001'). If provided, ignores other filter parameters.")]
        public virtual string? Slug { get; set; }

        ///<summary>
        ///Filter by schema version.
        ///</summary>
        [ApiMember(Description="Filter by schema version.")]
        public virtual int? SchemaVersion { get; set; }

        ///<summary>
        ///Number of records to skip
        ///</summary>
        [ApiMember(Description="Number of records to skip")]
        public virtual int? Skip { get; set; }

        ///<summary>
        ///Number of records to take
        ///</summary>
        [ApiMember(Description="Number of records to take")]
        public virtual int? Take { get; set; }

        ///<summary>
        ///Sort field
        ///</summary>
        [ApiMember(Description="Sort field")]
        public virtual string OrderBy { get; set; }
    }

}

namespace ServiceStack
{
    [DataContract]
    public partial class QueryResponse<T>
    {
        [DataMember(Order=1)]
        public virtual int Offset { get; set; }

        [DataMember(Order=2)]
        public virtual int Total { get; set; }

        [DataMember(Order=3)]
        public virtual List<AccessKeyTypeResponse> Results { get; set; } = [];

        [DataMember(Order=4)]
        public virtual Dictionary<string, string>? Meta { get; set; }

        [DataMember(Order=5)]
        public virtual ResponseStatus? ResponseStatus { get; set; }
    }

}

C# WidgetConfigurationQuery DTOs

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

HTTP + CSV

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

GET /widget/configuration HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Offset":0,"Total":0,"Results":[{"Id":"String","Name":"String","Slug":"String","Description":"String","Configuration":"String","SchemaVersion":0,"UpdatedDate":"0001-01-01T00:00:00.0000000+00:00","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"}}}