Trackunit API

<back to all web services

UpdateZone

The following routes are available for this service:
PUT/Zone
PUT/Zone/{Id}
GET POST/UpdateZone
GET POST/UpdateZone/{Id}
import 'package:servicestack/servicestack.dart';

// @DataContract
class UpdateZoneResponse implements IConvertible
{
    // @DataMember
    ResponseStatus? responseStatus;

    UpdateZoneResponse({this.responseStatus});
    UpdateZoneResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
    };

    getTypeName() => "UpdateZoneResponse";
    TypeContext? context = _ctx;
}

// @DataContract
class UpdateZone implements IConvertible
{
    // @DataMember
    String? id;

    // @DataMember
    String? name;

    // @DataMember
    String? note;

    // @DataMember
    String? polygon;

    UpdateZone({this.id,this.name,this.note,this.polygon});
    UpdateZone.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        name = json['name'];
        note = json['note'];
        polygon = json['polygon'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'name': name,
        'note': note,
        'polygon': polygon
    };

    getTypeName() => "UpdateZone";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.trackunit.com', types: <String, TypeInfo> {
    'UpdateZoneResponse': TypeInfo(TypeOf.Class, create:() => UpdateZoneResponse()),
    'UpdateZone': TypeInfo(TypeOf.Class, create:() => UpdateZone()),
});

Dart UpdateZone DTOs

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

HTTP + OTHER

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

POST /UpdateZone HTTP/1.1 
Host: api.trackunit.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"id":"String","name":"String","note":"String","polygon":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}