Antel Merchandiser App API

<back to all web services

GetPrincipal

Requires Authentication
The following routes are available for this service:
GET/principal/get
GetPrincipal Parameters:
NameParameterData TypeRequiredDescription
PrincipalIdqueryintNo
ApiServiceRequest Parameters:
NameParameterData TypeRequiredDescription
ApiKeyformstringYesThe API Key required for authentication
LatitudeformdoubleNoLatitude of the user making this request
LongitudeformdoubleNoLongitude of the user making this request
GetPrincipalResponse Parameters:
NameParameterData TypeRequiredDescription
DataformPrincipalDataYes
ApiServiceResponse Parameters:
NameParameterData TypeRequiredDescription
DescriptionformstringYesInformation about the response.
HeadingformstringYesHeading or summary of the response.
WasSuccessfulformbooleanYesDid the intended operation for this response complete successfully?
ResponseStatusformResponseStatusYes
PrincipalData Parameters:
NameParameterData TypeRequiredDescription
PrincipalIdformintNo
NameformstringYes
LogoImageUrlformstringYes
ProductsformList<ProductDataCategory>Yes
UpliftPrefixformstringYes
ContactNameformstringYes
ContactNumberformstringYes
ContactEmailformstringYes
HasLogoformboolNo
AllowProductLookupformboolNo
CaptureSerialNumberformboolNo
ShowProductionDateformboolNo
ShowExpiryDateformboolNo
ShowBatchCodeformboolNo
SealNumberPerProductformboolNo
AllowedProductStockStatusesformList<StockStatusData>Yes
EnabledformboolNo
ShowSealNumberformboolNo
ShowSealWeightformboolNo
ConsolidationEnabledformboolNo
ProductDataCategory Parameters:
NameParameterData TypeRequiredDescription
UnitBarcodeformstringYes
ProductsformList<ProductData>Yes
ProductData Parameters:
NameParameterData TypeRequiredDescription
ProductIdformintNo
PrincipalIdformintNo
PrincipalPrefixformstringYes
NameformstringYes
CategoryformstringYes
ProductCodeformstringYes
UnitBarcodeformstringYes
CartonQuantityformintNo
ShrinkQuantityformintNo
UnitQuantityformintNo
CartonMeasurementformstringYes
ShrinkMeasurementformstringYes
UnitMeasurementformstringYes
CartonWeightformdoubleNo
ShrinkWeightformdoubleNo
UnitWeightformdecimalNo
CartonPriceformdecimalNo
ShrinkPriceformdecimalNo
UnitPriceformdecimalNo
UnitOfMeasureIdformintNo
StockStatusData Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
NameformstringYes
PhotoRequiredformboolNo
BatchCodeMandatoryformboolNo
ColorformstringYes

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: returnit-api-dev.happen.zone 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Data: 
	{
		PrincipalId: 0,
		Name: String,
		LogoImageUrl: String,
		Products: 
		[
			{
				UnitBarcode: String,
				Products: 
				[
					{
						ProductId: 0,
						PrincipalId: 0,
						PrincipalPrefix: String,
						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,
						UnitOfMeasureId: 0
					}
				]
			}
		],
		UpliftPrefix: String,
		ContactName: String,
		ContactNumber: String,
		ContactEmail: String,
		HasLogo: False,
		AllowProductLookup: False,
		CaptureSerialNumber: False,
		ShowProductionDate: False,
		ShowExpiryDate: False,
		ShowBatchCode: False,
		SealNumberPerProduct: False,
		AllowedProductStockStatuses: 
		[
			{
				Id: 0,
				Name: String,
				PhotoRequired: False,
				BatchCodeMandatory: False,
				Color: String
			}
		],
		Enabled: False,
		ShowSealNumber: False,
		ShowSealWeight: False,
		ConsolidationEnabled: 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
		}
	}
}