Antel API

<back to all web services

GetPrincipal

Requires Authentication
The following routes are available for this service:
GET/principal/get

export class ApiServiceRequest implements IServiceRequest, IHasApiKey, IHasDeviceInfo
{
    /** @description The API Key required for authentication */
    // @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
    public apiKey: string;

    /** @description Latitude of the user making this request */
    // @ApiMember(DataType="double", Description="Latitude of the user making this request")
    public latitude: number;

    /** @description Longitude of the user making this request */
    // @ApiMember(DataType="double", Description="Longitude of the user making this request")
    public longitude: number;

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

export class ApiServiceResponse implements IServiceResponse
{
    /** @description Information about the response. */
    // @ApiMember(Description="Information about the response.", IsRequired=true)
    public description: string;

    /** @description Heading or summary of the response. */
    // @ApiMember(Description="Heading or summary of the response.", IsRequired=true)
    public heading: string;

    /** @description Did the intended operation for this response complete successfully? */
    // @ApiMember(DataType="boolean", Description="Did the intended operation for this response complete successfully?", IsRequired=true)
    public wasSuccessful: boolean;

    public responseStatus: ResponseStatus;

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

export class ProductData
{
    public productId: number;
    public principalId: number;
    public name: string;
    public category: string;
    public productCode: string;
    public unitBarcode: string;
    public cartonQuantity: number;
    public shrinkQuantity: number;
    public unitQuantity: number;
    public cartonMeasurement: string;
    public shrinkMeasurement: string;
    public unitMeasurement: string;
    public cartonWeight: number;
    public shrinkWeight: number;
    public unitWeight: number;
    public cartonPrice: number;
    public shrinkPrice: number;
    public unitPrice: number;
    public maxQuantity: number;
    public maxPrice: number;

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

export class ProductDataCategory
{
    public unitBarcode: string;
    public products: ProductData[];

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

export class ProductExceptionData
{
    public region: string;
    public channel: string;
    public productId: number;
    public stockStatusIds: number[];

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

export class PrincipalData
{
    public principalId: number;
    public name: string;
    public authLetterFileUrl: string[];
    public logoImageUrl: string;
    public products: ProductDataCategory[];
    public upliftPrefix: string;
    public contactName: string;
    public contactNumber: string;
    public contactEmail: string;
    public allowProductLookup: boolean;
    public hasLogo: boolean;
    public hasAuthLetter: boolean;
    public sealNetWeightMandatory: boolean;
    public allowBillableSeals: boolean;
    public captureSerialNumber: boolean;
    public batchCodesMandatory: boolean;
    public captureManufactureAndExpiryDate: boolean;
    public productExceptions: ProductExceptionData[];
    public usesOwnSealNumbers: boolean;

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

export class GetPrincipalResponse extends ApiServiceResponse
{
    public data: PrincipalData;

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

export class GetPrincipal extends ApiServiceRequest
{
    public principalId: number;

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

TypeScript GetPrincipal 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 /principal/get HTTP/1.1 
Host: antel.api.dev.86degrees.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	data: 
	{
		principalId: 0,
		name: String,
		authLetterFileUrl: 
		[
			String
		],
		logoImageUrl: String,
		products: 
		[
			{
				unitBarcode: String,
				products: 
				[
					{
						productId: 0,
						principalId: 0,
						name: String,
						category: String,
						productCode: String,
						unitBarcode: String,
						cartonQuantity: 0,
						shrinkQuantity: 0,
						unitQuantity: 0,
						cartonMeasurement: String,
						shrinkMeasurement: String,
						unitMeasurement: String,
						cartonWeight: 0,
						shrinkWeight: 0,
						unitWeight: 0,
						cartonPrice: 0,
						shrinkPrice: 0,
						unitPrice: 0,
						maxQuantity: 0,
						maxPrice: 0
					}
				]
			}
		],
		upliftPrefix: String,
		contactName: String,
		contactNumber: String,
		contactEmail: String,
		allowProductLookup: False,
		hasLogo: False,
		hasAuthLetter: False,
		sealNetWeightMandatory: False,
		allowBillableSeals: False,
		captureSerialNumber: False,
		batchCodesMandatory: False,
		captureManufactureAndExpiryDate: False,
		productExceptions: 
		[
			{
				region: String,
				channel: String,
				productId: 0,
				stockStatusIds: 
				[
					0
				]
			}
		],
		usesOwnSealNumbers: False
	},
	description: String,
	heading: String,
	wasSuccessful: False,
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}