Requires any of the roles: | Admin, TeamAdmin, MobileApp | Required permission: | Tickets.Add |
POST | /Venue |
---|
import 'package:servicestack/servicestack.dart';
class Venue implements IConvertible
{
int? id;
String? name;
String? countryCode;
double? latitude;
double? longitude;
Venue({this.id,this.name,this.countryCode,this.latitude,this.longitude});
Venue.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
countryCode = json['countryCode'];
latitude = JsonConverters.toDouble(json['latitude']);
longitude = JsonConverters.toDouble(json['longitude']);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'countryCode': countryCode,
'latitude': latitude,
'longitude': longitude
};
getTypeName() => "Venue";
TypeContext? context = _ctx;
}
class VenueResult implements IConvertible
{
Venue? item;
int? statusCode;
String? message;
VenueResult({this.item,this.statusCode,this.message});
VenueResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
item = JsonConverters.fromJson(json['item'],'Venue',context!);
statusCode = json['statusCode'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'item': JsonConverters.toJson(item,'Venue',context!),
'statusCode': statusCode,
'message': message
};
getTypeName() => "VenueResult";
TypeContext? context = _ctx;
}
class VenueCreateRequest implements IConvertible
{
Venue? item;
VenueCreateRequest({this.item});
VenueCreateRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
item = JsonConverters.fromJson(json['item'],'Venue',context!);
return this;
}
Map<String, dynamic> toJson() => {
'item': JsonConverters.toJson(item,'Venue',context!)
};
getTypeName() => "VenueCreateRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_autoupdates_live.smartnewapis.com', types: <String, TypeInfo> {
'Venue': TypeInfo(TypeOf.Class, create:() => Venue()),
'VenueResult': TypeInfo(TypeOf.Class, create:() => VenueResult()),
'VenueCreateRequest': TypeInfo(TypeOf.Class, create:() => VenueCreateRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Venue HTTP/1.1
Host: stubbur-autoupdates-live.smartnewapis.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"item":{"id":0,"name":"String","countryCode":"String","latitude":0,"longitude":0}}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"item":{"id":0,"name":"String","countryCode":"String","latitude":0,"longitude":0},"statusCode":0,"message":"String"}