| GET | /principal/get |
|---|
"use strict";
export class ApiServiceRequest {
/** @param {{apiKey?:string,latitude?:number,longitude?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The API Key required for authentication */
apiKey;
/**
* @type {number}
* @description Latitude of the user making this request */
latitude;
/**
* @type {number}
* @description Longitude of the user making this request */
longitude;
}
export class ApiServiceResponse {
/** @param {{description?:string,heading?:string,wasSuccessful?:boolean,responseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Information about the response. */
description;
/**
* @type {string}
* @description Heading or summary of the response. */
heading;
/**
* @type {boolean}
* @description Did the intended operation for this response complete successfully? */
wasSuccessful;
/** @type {ResponseStatus} */
responseStatus;
}
export class ProductData {
/** @param {{productId?:number,principalId?:number,name?:string,category?:string,productCode?:string,unitBarcode?:string,cartonQuantity?:number,shrinkQuantity?:number,unitQuantity?:number,cartonMeasurement?:string,shrinkMeasurement?:string,unitMeasurement?:string,cartonWeight?:number,shrinkWeight?:number,unitWeight?:number,cartonPrice?:number,shrinkPrice?:number,unitPrice?:number,maxQuantity?:number,maxPrice?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
productId;
/** @type {number} */
principalId;
/** @type {string} */
name;
/** @type {string} */
category;
/** @type {string} */
productCode;
/** @type {string} */
unitBarcode;
/** @type {number} */
cartonQuantity;
/** @type {number} */
shrinkQuantity;
/** @type {number} */
unitQuantity;
/** @type {string} */
cartonMeasurement;
/** @type {string} */
shrinkMeasurement;
/** @type {string} */
unitMeasurement;
/** @type {number} */
cartonWeight;
/** @type {number} */
shrinkWeight;
/** @type {number} */
unitWeight;
/** @type {number} */
cartonPrice;
/** @type {number} */
shrinkPrice;
/** @type {number} */
unitPrice;
/** @type {number} */
maxQuantity;
/** @type {number} */
maxPrice;
}
export class ProductDataCategory {
/** @param {{unitBarcode?:string,products?:ProductData[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
unitBarcode;
/** @type {ProductData[]} */
products;
}
export class ProductExceptionData {
/** @param {{region?:string,channel?:string,productId?:number,stockStatusIds?:number[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
region;
/** @type {string} */
channel;
/** @type {number} */
productId;
/** @type {number[]} */
stockStatusIds;
}
export class PrincipalData {
/** @param {{principalId?:number,name?:string,authLetterFileUrl?:string[],logoImageUrl?:string,products?:ProductDataCategory[],upliftPrefix?:string,contactName?:string,contactNumber?:string,contactEmail?:string,allowProductLookup?:boolean,hasLogo?:boolean,hasAuthLetter?:boolean,sealNetWeightMandatory?:boolean,allowBillableSeals?:boolean,captureSerialNumber?:boolean,batchCodesMandatory?:boolean,captureManufactureAndExpiryDate?:boolean,productExceptions?:ProductExceptionData[],usesOwnSealNumbers?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
principalId;
/** @type {string} */
name;
/** @type {string[]} */
authLetterFileUrl;
/** @type {string} */
logoImageUrl;
/** @type {ProductDataCategory[]} */
products;
/** @type {string} */
upliftPrefix;
/** @type {string} */
contactName;
/** @type {string} */
contactNumber;
/** @type {string} */
contactEmail;
/** @type {boolean} */
allowProductLookup;
/** @type {boolean} */
hasLogo;
/** @type {boolean} */
hasAuthLetter;
/** @type {boolean} */
sealNetWeightMandatory;
/** @type {boolean} */
allowBillableSeals;
/** @type {boolean} */
captureSerialNumber;
/** @type {boolean} */
batchCodesMandatory;
/** @type {boolean} */
captureManufactureAndExpiryDate;
/** @type {ProductExceptionData[]} */
productExceptions;
/** @type {boolean} */
usesOwnSealNumbers;
}
export class GetPrincipalResponse extends ApiServiceResponse {
/** @param {{data?:PrincipalData,description?:string,heading?:string,wasSuccessful?:boolean,responseStatus?:ResponseStatus}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {PrincipalData} */
data;
}
export class GetPrincipal extends ApiServiceRequest {
/** @param {{principalId?:number,apiKey?:string,latitude?:number,longitude?:number}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {number} */
principalId;
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=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
}
}
}