sfgboxapi

<back to all web services

UsersBoxesAdd

The following routes are available for this service:
POST/users_boxes
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    @DataContract
    public static class UsersBoxesAdd
    {
        @DataMember(Order=2)
        @Validate(Validator="NotNull")
        public Long appUserId = null;

        @DataMember(Order=3)
        @Validate(Validator="NotNull")
        public Long authAppUserId = null;

        @DataMember(Order=4)
        @Validate(Validator="NotNull")
        public Date deploymentDate = null;

        @DataMember(Order=5)
        @Validate(Validator="NotNull")
        public Integer numberBoxes = null;

        @DataMember(Order=6)
        @Validate(Validator="NotNull")
        public String recipientType = null;

        @DataMember(Order=7)
        public Long foodGardensId = null;

        @DataMember(Order=8)
        public String otherDescription = null;

        @DataMember(Order=9)
        public UUID publicAccessGuid = null;
        
        public Long getAppUserId() { return appUserId; }
        public UsersBoxesAdd setAppUserId(Long value) { this.appUserId = value; return this; }
        public Long getAuthAppUserId() { return authAppUserId; }
        public UsersBoxesAdd setAuthAppUserId(Long value) { this.authAppUserId = value; return this; }
        public Date getDeploymentDate() { return deploymentDate; }
        public UsersBoxesAdd setDeploymentDate(Date value) { this.deploymentDate = value; return this; }
        public Integer getNumberBoxes() { return numberBoxes; }
        public UsersBoxesAdd setNumberBoxes(Integer value) { this.numberBoxes = value; return this; }
        public String getRecipientType() { return recipientType; }
        public UsersBoxesAdd setRecipientType(String value) { this.recipientType = value; return this; }
        public Long getFoodGardensId() { return foodGardensId; }
        public UsersBoxesAdd setFoodGardensId(Long value) { this.foodGardensId = value; return this; }
        public String getOtherDescription() { return otherDescription; }
        public UsersBoxesAdd setOtherDescription(String value) { this.otherDescription = value; return this; }
        public UUID getPublicAccessGuid() { return publicAccessGuid; }
        public UsersBoxesAdd setPublicAccessGuid(UUID value) { this.publicAccessGuid = value; return this; }
    }

    public static class UsersBoxesAddResponse
    {
        @DataMember(Order=2)
        public Long appUserId = null;

        @DataMember(Order=3)
        public Long authAppUserId = null;

        @DataMember(Order=4)
        public Date deploymentDate = null;

        @DataMember(Order=5)
        public Integer numberBoxes = null;

        @DataMember(Order=6)
        public String recipientType = null;

        @DataMember(Order=7)
        public Long foodGardensId = null;

        @DataMember(Order=8)
        public String otherDescription = null;

        @DataMember(Order=9)
        public UUID publicAccessGuid = null;

        @DataMember(Order=10)
        public ResponseStatus responseStatus = null;
        
        public Long getAppUserId() { return appUserId; }
        public UsersBoxesAddResponse setAppUserId(Long value) { this.appUserId = value; return this; }
        public Long getAuthAppUserId() { return authAppUserId; }
        public UsersBoxesAddResponse setAuthAppUserId(Long value) { this.authAppUserId = value; return this; }
        public Date getDeploymentDate() { return deploymentDate; }
        public UsersBoxesAddResponse setDeploymentDate(Date value) { this.deploymentDate = value; return this; }
        public Integer getNumberBoxes() { return numberBoxes; }
        public UsersBoxesAddResponse setNumberBoxes(Integer value) { this.numberBoxes = value; return this; }
        public String getRecipientType() { return recipientType; }
        public UsersBoxesAddResponse setRecipientType(String value) { this.recipientType = value; return this; }
        public Long getFoodGardensId() { return foodGardensId; }
        public UsersBoxesAddResponse setFoodGardensId(Long value) { this.foodGardensId = value; return this; }
        public String getOtherDescription() { return otherDescription; }
        public UsersBoxesAddResponse setOtherDescription(String value) { this.otherDescription = value; return this; }
        public UUID getPublicAccessGuid() { return publicAccessGuid; }
        public UsersBoxesAddResponse setPublicAccessGuid(UUID value) { this.publicAccessGuid = value; return this; }
        public ResponseStatus getResponseStatus() { return responseStatus; }
        public UsersBoxesAddResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
    }

}

Java UsersBoxesAdd 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 /users_boxes HTTP/1.1 
Host: api.sfgtec.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	appUserId: 0,
	authAppUserId: 0,
	deploymentDate: 0001-01-01,
	numberBoxes: 0,
	recipientType: String,
	foodGardensId: 0,
	otherDescription: String,
	publicAccessGuid: 00000000000000000000000000000000
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	appUserId: 0,
	authAppUserId: 0,
	deploymentDate: 0001-01-01,
	numberBoxes: 0,
	recipientType: String,
	foodGardensId: 0,
	otherDescription: String,
	publicAccessGuid: 00000000000000000000000000000000,
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}