Response Structure
On every request, Api Store envelopes the result in an object called ServiceResponse.
The reposponse object has the following structure (typescript example):
export class ServiceResponse<T>:
{
status: string;
response?: T;
info?: ServiceResponseInfo;
}
export class ServiceResponseInfo
{
code: number;
message?: string;
field?: string;
}
ServiceResponse class:
– status - a string that can contain one of two values: “Success” and “Failure”.
– response - the actual API response (nullable).
– info an instance of “ServiceResponseInfo” class (nullable).
ServiceResponseInfo class:
– code - the numeric code for the info message.
– message - the info text message (nullable).
– field - the field that this message applies to (nullable).