Client library for API
npm install --save @datafire/tl_api_azurewebsites
let tl_api_azurewebsites = require('@datafire/tl_api_azurewebsites').create({
apikey: "",
access_token: "",
refresh_token: "",
client_id: "",
client_secret: "",
redirect_uri: ""
});
.then(data => {
console.log(data);
});
Web API for TL mobile and web app
Exchange the code passed to your redirect URI for an access_token
tl_api_azurewebsites.oauthCallback({
"code": ""
}, context)
- input
object
- code required
string
- code required
- output
object
- access_token
string
- refresh_token
string
- token_type
string
- scope
string
- expiration
string
- access_token
Exchange a refresh_token for an access_token
tl_api_azurewebsites.oauthRefresh(null, context)
This action has no parameters
- output
object
- access_token
string
- refresh_token
string
- token_type
string
- scope
string
- expiration
string
- access_token
Delete article from the system
tl_api_azurewebsites.Article_Delete({}, context)
- input
object
- ArticleId
integer
: indentity number(primary key) for article object
- ArticleId
- output DefaultResponseDTOOfInteger
Add new article
tl_api_azurewebsites.Article_Post({
"body": {
"name": "",
"type": "",
"price": 0,
"measureUnit": "",
"availableGyms": []
}
}, context)
- input
object
- body required ArticleDTO
update existing article
tl_api_azurewebsites.Article_Put({
"body": {
"name": "",
"type": "",
"price": 0,
"measureUnit": "",
"availableGyms": []
}
}, context)
- input
object
- body required ArticleDTO
Add article details that associate with a Gym
tl_api_azurewebsites.Article_UpdateArticleGymDetails({
"body": []
}, context)
- input
object
- body required
array
- items GymArticleDetailsDTO
- body required
tl_api_azurewebsites.Article_GetAddons({}, context)
- input
object
- searchText
string
: Search text - will be search by the name - gymIds
string
: Comma separated gymIds deafult "-1" for all gyms - type
string
- limit
integer
- offset
integer
- searchText
Get Gym specific properties for article
tl_api_azurewebsites.Article_GymArticleDetails({
"articleId": 0,
"gymId": 0
}, context)
- input
object
- articleId required
integer
: indentity number(primary key) for article object - gymId required
integer
: indentity number(primary key) for gym object
- articleId required
- output GymArticleDetailsDTO
Add measure unit
tl_api_azurewebsites.Article_AddMeasureUnit({
"body": []
}, context)
- input
object
- body required
array
- items MeasureUnitDTO
- body required
Get mesure units
tl_api_azurewebsites.Article_GetMeasureUnits({}, context)
- input
object
- type
string
: type of the measure unit (all, item, service)
- type
Get Revenue Accounts
tl_api_azurewebsites.Article_GetRevenueAccounts(null, context)
This action has no parameters
Search articles It will only return basic information of article
tl_api_azurewebsites.Article_Search({}, context)
- input
object
- searchText
string
: part of article name - gymId
integer
: -1 for all gyms - type
string
: filter article type. default is 'all' - orderBy
string
: order by column.!-- invalid column will give internal server error - limit
integer
: number of recode in result and default is 100. use negative numbers to order by desc - offset
integer
: number of recodes to skip - activeStatus
integer
: Active Status 1 : Active, 2: Inactive, 3: All, Default : 1
- searchText
Deactivate existing article
tl_api_azurewebsites.Article_UpdateStatus({}, context)
- input
object
- ArticleId
integer
- status
integer
: 1 : activate , 2 deactivate - userName
string
: Updating user
- ArticleId
- output DefaultResponseDTOOfInteger
Get article details This will return all properties related to article entity
tl_api_azurewebsites.Article_get({
"articleID": 0
}, context)
- input
object
- articleID required
integer
: indentity number (primary key) for article object
- articleID required
Authenticate and provide token for autherizations.
tl_api_azurewebsites.Auth_Login({
"body": {}
}, context)
- input
object
- body required LoginDTO
- output
string
Get gym details This will return all properties related to gym entity
tl_api_azurewebsites.Gym_get({
"gymID": 0
}, context)
- input
object
- gymID required
integer
: indentity number (primary key) for gym object
- gymID required
- output DefaultResponseDTOOfGymDTO
Get all of the members details This will return all properties related to member entity
tl_api_azurewebsites.Membership_Get(null, context)
This action has no parameters
- output
array
- items MemberDTO
Add new Member
tl_api_azurewebsites.Membership_Post({
"body": {}
}, context)
- input
object
- body required MemberDTO
- output
boolean
Delete existing package
tl_api_azurewebsites.Package_Delete({}, context)
- input
object
- PackageId
integer
: primary key of package entity
- PackageId
- output DefaultResponseDTOOfBoolean
Get package details by packageId
tl_api_azurewebsites.Package_Get({}, context)
- input
object
- packageId
integer
: primary key of package entity
- packageId
Insert new package into the system
tl_api_azurewebsites.Package_Post({
"body": {
"packageName": "",
"registrationFee": 0,
"packageType": "",
"serviceFee": 0
}
}, context)
- input
object
- body required PackageDTO
Update existing package by its ID
tl_api_azurewebsites.Package_Put({
"body": {
"packageName": "",
"registrationFee": 0,
"packageType": "",
"serviceFee": 0
}
}, context)
- input
object
- body required PackageDTO
Search packages
tl_api_azurewebsites.Package_Search({}, context)
- input
object
- searchText
string
: part of package name - gymId
integer
: primary key of TL gym entity - type
string
: filter package type.!-- default is 'all' - orderBy
string
: order by column.!-- invalid column will give internal server error - limit
integer
: number of recode in result and default is 100. use negative numbers to order by desc - offset
integer
: number of recodes to skip - activeStatus
integer
: active status active : 1, inactive : 2, all 3, deafult : 1 - categoryId
integer
: Packge Category Id - startpPrice
number
: Start price of the price Range - endPrice
number
: End Price of the price Range - requestSource
integer
: 1 : MRM, 2 : Mobile
- searchText
- output
array
Status update of existing package
tl_api_azurewebsites.Package_UpdateStatus({}, context)
- input
object
- packageId
integer
: package Id - status
integer
: status : 1 activate, 2 : deactivate - userName
string
: Status updated User
- packageId
- output DefaultResponseDTOOfBoolean
Get the current status of message
tl_api_azurewebsites.Status_Get({}, context)
- input
object
- messageId
string
: respose of POST request
- messageId
- output MessageStatus
Get the all Test objects.
tl_api_azurewebsites.Test_get(null, context)
This action has no parameters
- output TestDTO
Get all Users detail This will return all properties related to User entity
tl_api_azurewebsites.User_Get(null, context)
This action has no parameters
- output UserDTO
Register a new User
tl_api_azurewebsites.User_registerUser({}, context)
- input
object
- UserId
integer
: Indentity number(primary key) for user object. Generated in DB table when inserting a record. - AccountNumber
string
: Account number of the user.It can be any stakeholder of the application.even can be a gym. - GymNumber
string
: If this user is a gym, then the gym number. - ExternalEntityNumber
string
: Entity number that make a relationship with BOX API DB. - Name
string
: Name of the user. - Number
string
: Unique number maintain by application to idenify user. - IntroduceBy
integer
: If Someone introduced this user to the system, then that user's UserId. - Guardian
integer
: Gaurdian of the this user if he/she is under 18 years old. - TypeId
integer
: Type of the user.
- UserId
Output schema unknown
Update an exsisting User
tl_api_azurewebsites.User_updateUser({}, context)
- input
object
- UserId
integer
: Indentity number(primary key) for user object. Generated in DB table when inserting a record. - AccountNumber
string
: Account number of the user.It can be any stakeholder of the application.even can be a gym. - GymNumber
string
: If this user is a gym, then the gym number. - ExternalEntityNumber
string
: Entity number that make a relationship with BOX API DB. - Name
string
: Name of the user. - Number
string
: Unique number maintain by application to idenify user. - IntroduceBy
integer
: If Someone introduced this user to the system, then that user's UserId. - Guardian
integer
: Gaurdian of the this user if he/she is under 18 years old. - TypeId
integer
: Type of the user.
- UserId
Output schema unknown
- ApiException
- Message
string
- Source
string
- StackTrace
string
- errors
array
- items ValidationError
- isCustomErrorObject
boolean
- isModelValidatonError
boolean
- referenceDocumentLink
string
- referenceErrorCode
string
- statusCode
integer
- Message
- ApiResponse
object
- isError
boolean
- message
string
- statusCode
integer
- version
string
- isError
- ArticleDTO
object
: The ArticleDTO Class.- tags
string
- activeStatus
boolean
: Active Status - applyForAllGyms
boolean
- articleId
integer
- availableGyms required
array
- items GymDTO
- availableQty
number
: Default AvailableQty - barcode
string
- createdDate
string
- createdUser
string
- cronExpression
string
: Access Schedule CRON Expression - description
string
- discount
number
- employeeDiscount
number
: Default EmployeeDiscount - employeePrice
number
: Default EmployeePrice - gymArticles
array
: Gym Customizations- items GymArticleDetailsDTO
- isAddOn
boolean
- isInventoryItem
boolean
: Default IsInventoryItem of the Article - isObsolete
boolean
: Default IsObsolete of the Article - measureUnit required
string
- modifiedDate
string
- modifiedUser
string
- name required
string
- number
integer
- price required
number
- reorderLevel
number
: Deafault ReorderLevel - revenueAccountId
integer
: Default Revenue account - sellingPrice
number
: Default SellingPrice - type required
string
- vat
number
- vatApplicable
boolean
: VAT Applicable
- tags
- ArticleSearchDTO
object
: The ArticleSearchDTO Class.- tags
string
- activeStatus
boolean
: Active Status - applyForAllGyms
boolean
- articleId
integer
- createdDate
string
- createdUser
string
- description
string
- measureUnit
string
: MeasureUnit - modifiedDate
string
- modifiedUser
string
- name
string
- number
integer
- price
number
- sellingPrice
number
: Actual Selling price of the article - totalCount
integer
: total number of recode for particular search - type
string
: article type
- tags
- DefaultResponseDTOOfArticleDTO
object
: The DefaultResponseDTO Class.- isError
boolean
- message
string
- isError
- DefaultResponseDTOOfBoolean
object
: The DefaultResponseDTO Class.- isError
boolean
- message
string
- result
boolean
- isError
- DefaultResponseDTOOfGymDTO
object
: The DefaultResponseDTO Class.- isError
boolean
- message
string
- isError
- DefaultResponseDTOOfInteger
object
: The DefaultResponseDTO Class.- isError
boolean
- message
string
- result
integer
- isError
- DefaultResponseDTOOfListOfArticleSearchDTO
object
: The DefaultResponseDTO Class.- isError
boolean
- message
string
- result
array
- items ArticleSearchDTO
- isError
- DefaultResponseDTOOfListOfPackageSearchDTO
object
: The DefaultResponseDTO Class.- isError
boolean
- message
string
- result
array
- items PackageSearchDTO
- isError
- DefaultResponseDTOOfPackageDTO
object
: The DefaultResponseDTO Class.- isError
boolean
- message
string
- isError
- DefaultResponseDTOOfPackageSearchDTO
object
: The DefaultResponseDTO Class.- isError
boolean
- message
string
- isError
- DefaultResponseDTOOfStatusDTO
object
: The DefaultResponseDTO Class.- isError
boolean
- message
string
- isError
- DefaultResponseDTOOfString
object
: The DefaultResponseDTO Class.- isError
boolean
- message
string
- result
string
- isError
- Exception
object
- Message
string
- Source
string
- StackTrace
string
- Message
- GymArticleDetailsDTO
object
: The GymArticleDetailsDTO Class.- articleId
integer
- availableQty
number
- createdUser
string
: Created User - employeeDiscount
number
- employeePrice
number
- gymId
integer
: Gym Id where article is related - gymIdList
string
: GymId - Gym Id string with comma separated GymIds - gymName
string
: Gym Name - id
integer
- isDefault
boolean
: Set as the default values for the article - isInventoryItem
boolean
- isObsolete
boolean
- modifiedUser
string
: Modified user - reorderLevel
number
- revenueAccountId
integer
: Revenue account Id - sellingPrice
number
- articleId
- GymDTO
object
: The GymDTO Class.- externalGymNumber
integer
- gymId
integer
- gymName
string
- location
string
- externalGymNumber
- LoginDTO
object
: The LoginDTO Class.- password
string
- remember
boolean
- username
string
- password
- MeasureUnitDTO
object
: Mesure unit to represent article mesure unit- id
integer
: Id of the table - name
string
: Mesure Unit Type - type
string
: Type of the article used with (all, service, item)
- id
- MemberDTO
object
: The MemeberDTO Class.- name
string
- name
- MessageStatus
object
- messageId
string
- referenceId
integer
- statusId
integer
- statusText
string
- messageId
- PackageDTO
object
: The PackageDTO Class.- tags
string
: Comma separated string values in case of need of maintain some labels kind of - addOns
array
: Extra articles list added to the given package.- items PackageItemDTO
- addonFee
number
: sum of addon fees. - applyForAllGyms
boolean
: Boolean value to indicate wheather package is available in all the gyms. - availableGyms
array
: Gyms list where this package is available.- items GymDTO
- bindingPeriod
integer
: Range of period a member is bound to the contract if he/she choose this package. - createdDate
string
: Package created DateTime. - createdUser
string
: Package created user. - description
string
: Common descriptions about package.If there are more instructions - endDate
string
: End date of the package.After that package is not valid for use. - expireInMonths
integer
: No of months the fixed package is valid for sale - features
string
: What are the facilities, features available for package.ex:- wifi, - freeMonths
integer
: No of months gym member can come without payments. - instructionsToGymUsers
string
: Instruction to the gym members relevant to the package. - instructionsToWebUsers
string
: Instruction to the MRM members relevant to the package. - isActive
boolean
: Boolean value to indicate this package is still active or not. - isAtg
boolean
: Boolean value to indicate ATG transaction from bank is applicable or not. - isAutoRenew
boolean
: Boolean value to indicate the contract will auto renew after expiration - isFirstMonthFree
boolean
: Boolean value to indicate if the first month charges is free. - isRegistrationFee
boolean
: Boolean value to indicate this package has registration fee or not. - isRestAmount
boolean
: Boolean value to indicate rest amount is applicable or not. - isShownInMobile
boolean
: Boolean value to indicate package is visible in Mobile App or not. - isSponsorPackage
boolean
: Boolean value to indicate package can be sponsored or not by other party. - maximumGiveAwayRestAmount
number
: If a member join the gym middle of a month via this package, - memberCanAddAddOns
boolean
: Boolean value to indicate member can add extra addons he wish if he choose this package. - memberCanLeaveWithinFreePeriod
boolean
: Boolean value to indicate if member can leave from contract within - memberCanRemoveAddOns
boolean
: Boolean value to indicate member can remove already added addons if he choose this package. - modifiedDate
string
: Package last modified DateTime. - modifiedUser
string
: Package last modified user. - monthlyFee
number
: Monthly installment fee if package is not fixed visit. - nextPackageNumber
integer
: Next Package the contract continue after the binding period of this package. - numberOfInstallments
integer
: Maximum Number of installment a member can divide the package price/cost to pay. - numberOfVisits
integer
: If package is fixed visit type, then how many visits are available for this package. - packageId
integer
- packageName required
string
- packageNumber
string
- packageType required
string
: Package type can be either fixed visit or unlimited. - perVisitPrice
number
: Cost/Price of the single visit to gym. - registrationFee required
number
: Registartion fee for the package at a gym. - serviceFee required
number
: total Service charge of the package for entire period. - shownInWeb
boolean
: Boolean value to show this package in MRM system or not. - startDate
string
: Start date of the package. - totalPrice
number
: total price for the package including Addon fees, service fee and registration fee.
- tags
- PackageItemDTO
object
: The PackageItemDTO Class.- articleId required
integer
: Refer to ArticleId in Article table in DB. - articleName
string
: Name of the article(Addon) in a particular package. - articleNumber
integer
: Number assigned the article(Addon) in a particular package. - articlePrice
number
: Price of the article determined from that package. - endOrder
integer
: Number of the installment this article is available to. - isIncludeServiceInCharge
boolean
: Is Included in service charge - measureUnit
string
- numberOfItems
number
: How many article(Addon) is available for that package from that type. - startOrder
integer
: Number of the installment this article is available from.
- articleId required
- PackageSearchDTO
object
: The PackageSearchDTO Class.- tags
string
: Comma separated string values in case of need of maintain some labels kind of stuff relevant to the package. - activeStatus
boolean
: Active Status - addonFee
number
: sum of addon fees. - applyForAllGyms
boolean
: Boolean value to indicate wheather package is available in all the gyms. - bindingPeriod
integer
: Range of period a member is bound to the contract if he/she choose this package. - createdDate
string
: Package created DateTime. - createdUser
string
: Package created user. - description
string
: Common descriptions about package.If there are more instructions can be stored as comma separated values. - features
string
: What are the facilities, features available for package.ex:- wifi, ACm etc.Can be stored as comma seperated values. - freeMonths
integer
: No of months gym member can come without payments. - memberCanRemoveAddOns
boolean
: Boolean value to indicate member can remove already added addons if he choose this package. - modifiedDate
string
: Package last modified DateTime. - modifiedUser
string
: Package last modified user. - monthlyFee
number
: Monthly installment fee if package is not fixed visit. - numberOfVisits
integer
: No of visits for fixed package - packageId
integer
- packageName
string
- packageNumber
integer
- packageType
string
: Package type can be either fixed visit or unlimited. - registrationFee
number
: Registartion fee for the package at a gym. - serviceFee
number
: total Service charge of the package for entire period. - totalCount
integer
: total number of recode for particular search - totalPrice
number
: total price for the package including Addon fees, service fee and registration fee.
- tags
- ProblemDetails
object
- detail
string
- extensions
object
- instance
string
- status
integer
- title
string
- type
string
- detail
- StatusDTO
object
: Imideate response for long running api call.- messageId
string
: Reference id for status endpoint - statusText
string
: Status of API Call - url
string
: Relative url for stauts check
- messageId
- TestDTO
object
: The TestDTO Class.- id
integer
: Id of the Test object
- id
- UserDTO
object
: The UserDTO Class.- accountNumber
string
: Account number of the user.It can be any stakeholder of the application.even can be a gym. - externalEntityNumber
string
: Entity number that make a relationship with BOX API DB. - guardian
integer
: Gaurdian of the this user if he/she is under 18 years old. - gymNumber
string
: If this user is a gym, then the gym number. - introduceBy
integer
: If Someone introduced this user to the system, then that user's UserId. - name
string
: Name of the user. - number
string
: Unique number maintain by application to idenify user. - typeId
integer
: Type of the user. - userId
integer
: Indentity number(primary key) for user object. Generated in DB table when inserting a record.
- accountNumber
- ValidationError
object
- field
string
- message
string
- field