| POST | /v4/short-links |
|---|
import 'package:servicestack/servicestack.dart';
// @DataContract
class PostAffiliateTokenSetResponse implements IConvertible
{
// @DataMember
bool? success;
// @DataMember
ResponseStatus? responseStatus;
PostAffiliateTokenSetResponse({this.success,this.responseStatus});
PostAffiliateTokenSetResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
success = json['success'];
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'success': success,
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
};
getTypeName() => "PostAffiliateTokenSetResponse";
TypeContext? context = _ctx;
}
// @DataContract
class PostAffiliateTokenSetRequest implements IConvertible
{
// @DataMember(Name="baseCode")
String? baseCode;
// @DataMember(Name="domain")
String? domain;
// @DataMember(Name="username")
String? username;
// @DataMember(Name="affiliateTokensSet")
String? affiliateTokensSet;
PostAffiliateTokenSetRequest({this.baseCode,this.domain,this.username,this.affiliateTokensSet});
PostAffiliateTokenSetRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
baseCode = json['baseCode'];
domain = json['domain'];
username = json['username'];
affiliateTokensSet = json['affiliateTokensSet'];
return this;
}
Map<String, dynamic> toJson() => {
'baseCode': baseCode,
'domain': domain,
'username': username,
'affiliateTokensSet': affiliateTokensSet
};
getTypeName() => "PostAffiliateTokenSetRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'shortlinks_api.qa.platform.georiot.com', types: <String, TypeInfo> {
'PostAffiliateTokenSetResponse': TypeInfo(TypeOf.Class, create:() => PostAffiliateTokenSetResponse()),
'PostAffiliateTokenSetRequest': TypeInfo(TypeOf.Class, create:() => PostAffiliateTokenSetRequest()),
});
Dart PostAffiliateTokenSetRequest 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.
POST /v4/short-links HTTP/1.1
Host: shortlinks-api.qa.platform.georiot.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
baseCode: String,
domain: String,
username: String,
affiliateTokensSet: 00000000000000000000000000000000
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
success: False,
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}
}