| GET | /widget/configuration | List or get widget configurations | Returns widget configurations. If slug is provided, returns a single configuration matching that slug. Otherwise returns all configurations for the company. |
|---|
import Foundation
import ServiceStack
// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
// @ValidateRequest(Validator="IsAuthenticated")
public class WidgetConfigurationQuery : ICompany, Codable
{
/**
* The company id, if empty will use the company id for the user you are logged in with.
*/
// @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
public var companyId:String?
/**
* Optional slug to fetch a single configuration (e.g., 'hairsalon-001'). If provided, ignores other filter parameters.
*/
// @ApiMember(Description="Optional slug to fetch a single configuration (e.g., 'hairsalon-001'). If provided, ignores other filter parameters.")
public var slug:String
/**
* Filter by schema version.
*/
// @ApiMember(Description="Filter by schema version.")
public var schemaVersion:Int?
/**
* Number of records to skip
*/
// @ApiMember(Description="Number of records to skip")
public var skip:Int?
/**
* Number of records to take
*/
// @ApiMember(Description="Number of records to take")
public var take:Int?
/**
* Sort field
*/
// @ApiMember(Description="Sort field")
public var orderBy:String
required public init(){}
}
public class AccessKeyTypeResponse : Codable
{
public var id:Int
public var keyType:String
public var Description:String
required public init(){}
}
Swift WidgetConfigurationQuery DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
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
}
}
}