Booklinker.API

<back to all web services

GetVanityCodeAvailabilityRequest

The following routes are available for this service:
GET/v1/vanity-codes/availability

// @DataContract
export class GetVanityCodeAvailabilityResponse
{
    // @DataMember(Name="isAvailable")
    public isAvailable: boolean;

    // @DataMember(Name="responseStatus")
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<GetVanityCodeAvailabilityResponse>) { (Object as any).assign(this, init); }
}

// @DataContract
export class GetVanityCodeAvailabilityRequest
{
    // @DataMember(Name="code")
    public code: string;

    // @DataMember(Name="domain")
    public domain: string;

    public constructor(init?: Partial<GetVanityCodeAvailabilityRequest>) { (Object as any).assign(this, init); }
}

TypeScript GetVanityCodeAvailabilityRequest DTOs

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

HTTP + JSV

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

GET /v1/vanity-codes/availability HTTP/1.1 
Host: api.booklinker.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

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