ShortlinksAPI

<back to all web services

PutUserLinkRequest

Requires Authentication
The following routes are available for this service:
PUT/v4/links
PUT/v4/links/{Id}
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;

public class dtos
{

    @DataContract
    public static class PutUserLinkRequest extends V4BaseRequest implements IPutUserLinkRequest
    {
        @DataMember(Name="id")
        @SerializedName("id")
        public String id = null;

        @DataMember(Name="linkType")
        @SerializedName("linkType")
        public LinkType linkType = null;

        @DataMember(Name="typeDefinitionPublicId")
        @SerializedName("typeDefinitionPublicId")
        public String typeDefinitionPublicId = null;
        
        public String getId() { return id; }
        public PutUserLinkRequest setId(String value) { this.id = value; return this; }
        public LinkType getLinkType() { return linkType; }
        public PutUserLinkRequest setLinkType(LinkType value) { this.linkType = value; return this; }
        public String getTypeDefinitionPublicId() { return typeDefinitionPublicId; }
        public PutUserLinkRequest setTypeDefinitionPublicId(String value) { this.typeDefinitionPublicId = value; return this; }
    }

    @DataContract
    public static class V4BaseRequest
    {
        
    }

    public static enum LinkType
    {
        None,
        Simple,
        Split,
        Interstitial,
        Advanced,
        Collection;
    }

    @DataContract
    public static class PutUserLinkResponse extends V4BaseResponse
    {
        
    }

    @DataContract
    public static class V4BaseResponse
    {
        @DataMember(Name="status")
        @SerializedName("status")
        public ResponseStatus responseStatus = null;
        
        public ResponseStatus getResponseStatus() { return responseStatus; }
        public V4BaseResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
    }

}

Java PutUserLinkRequest DTOs

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

HTTP + JSON

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

PUT /v4/links HTTP/1.1 
Host: shortlinks-api.qa.platform.georiot.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"id":"String","linkType":"None","typeDefinitionPublicId":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

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