| Requires any of the roles: | Agent, Administrator, Agent, Administrator, Agent, Administrator |
| GET,POST,PUT,DELETE,OPTIONS | /v1/CustomerToLocations/{CustomerId} | ||
|---|---|---|---|
| GET,POST,PUT,DELETE,OPTIONS | /v1/CustomerToLocations |
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class CustomerToLocationObject implements IConvertible
{
String? CustomerId;
String? LocationId;
CustomerToLocationObject({this.CustomerId,this.LocationId});
CustomerToLocationObject.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CustomerId = json['CustomerId'];
LocationId = json['LocationId'];
return this;
}
Map<String, dynamic> toJson() => {
'CustomerId': CustomerId,
'LocationId': LocationId
};
getTypeName() => "CustomerToLocationObject";
TypeContext? context = _ctx;
}
class CustomerToLocationsResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
List<CustomerToLocationObject>? CustomerToLocations = [];
CustomerToLocationsResponse({this.ResponseStatus,this.CustomerToLocations});
CustomerToLocationsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
CustomerToLocations = JsonConverters.fromJson(json['CustomerToLocations'],'List<CustomerToLocationObject>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'CustomerToLocations': JsonConverters.toJson(CustomerToLocations,'List<CustomerToLocationObject>',context!)
};
getTypeName() => "CustomerToLocationsResponse";
TypeContext? context = _ctx;
}
class CustomerToLocations extends CustomerToLocationObject implements IConvertible
{
String? ApiKey;
CustomerToLocations({this.ApiKey});
CustomerToLocations.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
ApiKey = json['ApiKey'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'ApiKey': ApiKey
});
getTypeName() => "CustomerToLocations";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'CustomerToLocationObject': TypeInfo(TypeOf.Class, create:() => CustomerToLocationObject()),
'CustomerToLocationsResponse': TypeInfo(TypeOf.Class, create:() => CustomerToLocationsResponse()),
'List<CustomerToLocationObject>': TypeInfo(TypeOf.Class, create:() => <CustomerToLocationObject>[]),
'CustomerToLocations': TypeInfo(TypeOf.Class, create:() => CustomerToLocations()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/CustomerToLocations/{CustomerId} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"ApiKey":"00000000000000000000000000000000","CustomerId":"00000000000000000000000000000000","LocationId":"00000000000000000000000000000000"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"CustomerToLocations":[{"CustomerId":"00000000000000000000000000000000","LocationId":"00000000000000000000000000000000"}]}