TechStacks!

<back to all web services

CreateOrganization

Organization
Requires Authentication
The following routes are available for this service:
POST/orgs
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class CreateOrganization implements IPost
    {
        public String name = null;
        public String slug = null;
        public String description = null;
        public Long refId = null;
        public String refSource = null;
        public String refUrn = null;
        
        public String getName() { return name; }
        public CreateOrganization setName(String value) { this.name = value; return this; }
        public String getSlug() { return slug; }
        public CreateOrganization setSlug(String value) { this.slug = value; return this; }
        public String getDescription() { return description; }
        public CreateOrganization setDescription(String value) { this.description = value; return this; }
        public Long getRefId() { return refId; }
        public CreateOrganization setRefId(Long value) { this.refId = value; return this; }
        public String getRefSource() { return refSource; }
        public CreateOrganization setRefSource(String value) { this.refSource = value; return this; }
        public String getRefUrn() { return refUrn; }
        public CreateOrganization setRefUrn(String value) { this.refUrn = value; return this; }
    }

    public static class CreateOrganizationResponse
    {
        public Integer id = null;
        public String slug = null;
        public ResponseStatus responseStatus = null;
        
        public Integer getId() { return id; }
        public CreateOrganizationResponse setId(Integer value) { this.id = value; return this; }
        public String getSlug() { return slug; }
        public CreateOrganizationResponse setSlug(String value) { this.slug = value; return this; }
        public ResponseStatus getResponseStatus() { return responseStatus; }
        public CreateOrganizationResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
    }

}

Java CreateOrganization 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.

POST /orgs HTTP/1.1 
Host: techstacks.io 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	name: String,
	slug: String,
	description: String,
	refId: 0,
	refSource: String,
	refUrn: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	id: 0,
	slug: String,
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}