sfgboxapi

<back to all web services

CropsCylindersAdd

Requires Authentication
The following routes are available for this service:
POST/crops_cylinders

export class CropsCylindersAddResponse
{
    // @DataMember(Order=2)
    public tenantsId: number;

    // @DataMember(Order=3)
    public zonesId: number;

    // @DataMember(Order=4)
    public cropsId: number;

    // @DataMember(Order=5)
    public thickness: string;

    // @DataMember(Order=6)
    public colour: string;

    // @DataMember(Order=7)
    public imageUrl: string;

    // @DataMember(Order=8)
    public responseStatus: ResponseStatus;

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

// @DataContract
export class CropsCylindersAdd
{
    // @DataMember(Order=2)
    // @Validate(Validator="NotNull")
    public tenantsId: number;

    // @DataMember(Order=3)
    // @Validate(Validator="NotNull")
    public zonesId: number;

    // @DataMember(Order=4)
    // @Validate(Validator="NotNull")
    public cropsId: number;

    // @DataMember(Order=5)
    // @Validate(Validator="NotNull")
    public thickness: string;

    // @DataMember(Order=6)
    // @Validate(Validator="NotNull")
    public colour: string;

    // @DataMember(Order=7)
    // @Validate(Validator="NotNull")
    public imageUrl: string;

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

TypeScript CropsCylindersAdd 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 /crops_cylinders HTTP/1.1 
Host: sfgboxapi.dev.scadsoftware.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	tenantsId: 0,
	zonesId: 0,
	cropsId: 0,
	thickness: String,
	colour: String,
	imageUrl: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	tenantsId: 0,
	zonesId: 0,
	cropsId: 0,
	thickness: String,
	colour: String,
	imageUrl: String,
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}