### Get All Assets Example Source: https://www.reftab.com/api-docs This is an example of the JSON response when retrieving all assets. It includes detailed information about a single asset, such as its title, ID, creation date, location, category, notes, and status. ```json [ { "title": "MacBook Pro", "aid": "MAC000001", "created": null, "clid": 1, "cid": 1, "notes": "Sample notes", "upid": null, "loanPeriod": 72, "statid": null, "details": { "Monitor": "13-Inch", "Vendor": "Apple" }, "catName": "Computer", "clientName": "New York Office", "locationName": "New York Office", "lid": null, "loanee": null, "loaneeName": null, "due": null, "check_out": null, "thumbnail": null, "imageLink": null, "filename": null, "lastScanned": null, "permission": "edit", "depreciation": { "error": "missing fields needed to calculate depreciation" }, "loan": { "check_out": null, "due": null, "lid": null, "loanee": null, "loaneeName": null }, "image": { "filename": null, "full": null, "thumbnail": null }, "status": { "name": "Working Condition", "loanability": 1, "defaultVisibility": 1, "color": "#09ec2f" } } ] ``` -------------------------------- ### Get Asset Example Source: https://www.reftab.com/api-docs This JSON object represents a sample response for retrieving a single asset. It includes details like the asset's title, ID, creation date, category, location, and custom details specific to its category. ```json { "title": "MacBook Pro", "aid": "MAC000001", "created": null, "clid": 1, "cid": 1, "notes": "Sample notes", "upid": null, "loanPeriod": 72, "statid": null, "details": { "Monitor": "13-Inch", "Vendor": "Apple" }, "catName": "Computer", "clientName": "New York Office", "locationName": "New York Office", "lid": null, "loanee": null, "loaneeName": null, "due": null, "check_out": null, "thumbnail": null, "imageLink": null, "filename": null, "lastScanned": null, "permission": "edit", "depreciation": { "error": "missing fields needed to calculate depreciation" }, "loan": { "check_out": null, "due": null, "lid": null, "loanee": null, "loaneeName": null }, "image": { "filename": null, "full": null, "thumbnail": null }, "status": { "name": "Working Condition", "loanability": 1, "defaultVisibility": 1, "color": "#09ec2f" } } ``` -------------------------------- ### Response Sample for Getting All Loan Fields Source: https://www.reftab.com/api-docs Example structure of the response when successfully retrieving all loan fields. Each field includes its name, type, and ID. ```json [ { "name": "string", "type": "string", "lnfid": 1 } ] ``` -------------------------------- ### Get Applications Response Sample Source: https://www.reftab.com/api-docs This is a sample JSON response for the 'get applications' endpoint, illustrating the structure of an application record. ```json [ { "applicationId": 0, "name": "string", "vendorId": 0, "vendor": { "vendorId": 0, "name": "string", "legalName": "string", "website": "string" }, "category": "string", "description": "string", "website": "string", "status": "active", "upid": 0, "thumbnail": "string", "compliances": [ "string" ], "regions": [ "string" ], "owners": [ {} ], "ownersUids": [ 0 ], "roles": [ { "applicationRoleId": 0, "name": "string", "default": 0 } ], "cost": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "createdSource": "manual", "licenses": [ { "title": "string", "applicationId": 1, "licid": 1, "cost": "string", "email": "string", "locationName": "string", "vendor": "string", "productKey": "string", "orderNumber": "string", "notes": "string", "licensee": "string", "minSeats": 0, "notificationDays": 0, "portalVisible": 0, "seats": 0, "used": 0, "clid": 0, "purchased": "2019-08-24T14:15:22Z", "expiration": "2019-08-24T14:15:22Z", "cancelledAt": "2019-08-24T14:15:22Z", "cancelledBy": 0, "terminatedAt": "2019-08-24T14:15:22Z", "upid": 0, "details": { }, "loans": [ {} ], "assets": [ {} ] } ], "kbApplicationId": 0, "kbVendorId": 0 } ] ``` -------------------------------- ### Get Loanee Details (JSON Response) Source: https://www.reftab.com/api-docs This is a sample JSON response for a successful GET request to retrieve a loanee's information. It includes all fields associated with a loanee. ```json { * "lnid": 1, * "name": "string", * "email": "string", * "title": "string", * "employeeId": "string", * "disabled": true, * "details": { } } ``` -------------------------------- ### Request Signing Example Source: https://www.reftab.com/api-docs This Javascript example demonstrates how to sign and authenticate requests to the Reftab API using HMAC-SHA256. It includes placeholders for your public and secret keys. ```APIDOC ## Request Signing ### Description This example shows how to sign a request to the Reftab API using HMAC-SHA256. You will need to replace `REPLACE_WITH_PUBLIC_KEY` and `REPLACE_WITH_SECRET_KEY` with your actual API keys. ### Method POST, GET, PUT, DELETE (depending on the request) ### Endpoint Any Reftab API endpoint ### Parameters #### Request Body (for POST/PUT) - **body** (string) - Required - The JSON-encoded request body. ### Request Example ```javascript // CryptoJS is needed for the md5 and HmacSHA256 methods // MD5 hash must be in lowercase function signRequest (request) { const publicKey = 'REPLACE_WITH_PUBLIC_KEY'; const secretKey = 'REPLACE_WITH_SECRET_KEY'; const body = request.body; const method = request.method; const url = request.url; const now = new Date().toUTCString(); let contentMD5 = ''; let contentType = ''; if (body !== undefined) { contentMD5 = CryptoJS.md5(body).toString(); contentType = 'application/json'; } let signatureToSign = method + '\n' + contentMD5 + '\n' + contentType + '\n' + now + '\n' + url; signatureToSign = unescape(encodeURIComponent(signatureToSign)); const token = btoa(CryptoJS.HmacSHA256(signatureToSign, secretKey)); const signature = 'RT ' + publicKey + ':' + token; request.headers.Authorization = signature; request.headers['x-rt-date'] = now; return request; } //expected input object const options = { method: 'GET', url: 'https://www.reftab.com/api/locations' }; fetch('https://www.reftab.com/api/locations', signRequest(options)); ``` ### Response #### Success Response (200) - **headers** (object) - Contains `Authorization` and `x-rt-date` headers. #### Response Example (Response depends on the actual API call, this example shows the signed request headers) ```json { "Authorization": "RT YOUR_PUBLIC_KEY:YOUR_SIGNED_TOKEN", "x-rt-date": "Tue, 15 Nov 1994 08:12:31 GMT" } ``` ``` -------------------------------- ### Get All Licenses Response Source: https://www.reftab.com/api-docs This is a sample JSON response for the 'Get all licenses' endpoint. It returns an array of license objects, each containing detailed information about a license. ```json [ { "title": "string", "applicationId": 1, "licid": 1, "cost": "string", "email": "string", "locationName": "string", "vendor": "string", "productKey": "string", "orderNumber": "string", "notes": "string", "licensee": "string", "minSeats": 0, "notificationDays": 0, "portalVisible": 0, "seats": 0, "used": 0, "clid": 0, "purchased": "2019-08-24T14:15:22Z", "expiration": "2019-08-24T14:15:22Z", "cancelledAt": "2019-08-24T14:15:22Z", "cancelledBy": 0, "terminatedAt": "2019-08-24T14:15:22Z", "upid": 0, "details": { }, "loans": [ { } ], "assets": [ { } ] } ] ``` -------------------------------- ### Get Applications Source: https://www.reftab.com/api-docs Retrieves a list of all applications. This endpoint is useful for getting an overview of applications managed within Reftab. ```APIDOC ## GET /api/applications ### Description Retrieves a list of all applications. ### Method GET ### Endpoint /api/applications ### Authorizations _api_ ### Responses #### Success Response (200) Returns an array of application objects. - **applicationId** (integer) - Required - Unique identifier for the application. - **name** (string) - Required - Name of the application (max 255 characters). - **vendorId** (integer) - Required - Identifier for the vendor associated with the application. - **category** (string) - Required - Category of the application (max 255 characters). - **description** (string) - Description of the application. - **website** (string) - Website URL for the application (max 255 characters). - **status** (string) - Status of the application. Enum: "active", "inactive", "decommissioned", "pending". - **vendor** (object or null) - Vendor details. - **upid** (integer or null) - Unique product identifier. - **thumbnail** (string or null) - URL for the application's thumbnail. - **compliances** (Array of strings) - List of compliance standards. - **regions** (Array of strings) - List of regions where the application is deployed. - **owners** (Array of objects) - List of application owners. - **ownersUids** (Array of integers) - List of owner UIDs. - **roles** (Array of objects) - List of application roles. - **cost** (integer or null) - Associated cost of the application. - **createdAt** (string) - Date and time when the application was created. - **updatedAt** (string) - Date and time when the application was last updated. - **createdSource** (string) - Source of creation. Enum: "manual", "browserExtension". - **licenses** (Array of objects) - List of associated licenses. - **kbApplicationId** (integer or null) - Knowledge base application ID. - **kbVendorId** (integer or null) - Knowledge base vendor ID. #### Response Example (200) ```json [ { "applicationId": 0, "name": "string", "vendorId": 0, "vendor": { "vendorId": 0, "name": "string", "legalName": "string", "website": "string" }, "category": "string", "description": "string", "website": "string", "status": "active", "upid": 0, "thumbnail": "string", "compliances": [ "string" ], "regions": [ "string" ], "owners": [ {} ], "ownersUids": [ 0 ], "roles": [ { "applicationRoleId": 0, "name": "string", "default": 0 } ], "cost": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "createdSource": "manual", "licenses": [ { "title": "string", "applicationId": 1, "licid": 1, "cost": "string", "email": "string", "locationName": "string", "vendor": "string", "productKey": "string", "orderNumber": "string", "notes": "string", "licensee": "string", "minSeats": 0, "notificationDays": 0, "portalVisible": 0, "seats": 0, "used": 0, "clid": 0, "purchased": "2019-08-24T14:15:22Z", "expiration": "2019-08-24T14:15:22Z", "cancelledAt": "2019-08-24T14:15:22Z", "cancelledBy": 0, "terminatedAt": "2019-08-24T14:15:22Z", "upid": 0, "details": {}, "loans": [ {} ], "assets": [ {} ] } ], "kbApplicationId": 0, "kbVendorId": 0 } ] ``` #### Error Response (401) Unauthorized. ### Content Type application/json ``` -------------------------------- ### Response Sample for Getting All Locations Source: https://www.reftab.com/api-docs This is a sample JSON response for the 'Get all locations' endpoint, illustrating the structure of location data. ```json [ { "name": "string", "address": "string", "phone": "string", "email": "string", "mainContact": "string", "notes": "string", "parent": 1, "reservationBookingWindowDays": 2147483647, "clid": 1, "upid": 1, "assetCount": 0, "licenseCount": 0, "accessoryCount": 0, "expiredLicenseCount": 0, "minimumAccessoryCount": 0, "categories": { }, "children": [ { "name": "string", "address": "string", "phone": "string", "email": "string", "mainContact": "string", "notes": "string", "parent": 1, "reservationBookingWindowDays": 2147483647, "clid": 1, "upid": 1, "assetCount": 0, "licenseCount": 0, "accessoryCount": 0, "expiredLicenseCount": 0, "minimumAccessoryCount": 0, "categories": { } } ] } ] ``` -------------------------------- ### Get all kit fields Source: https://www.reftab.com/api-docs Retrieves a list of all available kit fields. ```APIDOC ## GET /api/kitfields ### Description Retrieves an array of all kit fields. ### Method GET ### Endpoint /api/kitfields ### Response #### Success Response (200) An array of kit fields, where each field has: - **name** (string) - The user field name - **type** (string) - The type of field - **kfid** (integer) - The kit field ID #### Response Example ```json [ { "name": "string", "type": "string", "kfid": 1 } ] ``` ``` -------------------------------- ### Get all accessories Source: https://www.reftab.com/api-docs Retrieves a list of all accessories, with options for pagination and expansion. Requires API authorization. ```APIDOC ## GET /api/accessories ### Description Retrieves a list of accessories. Supports pagination and an option to include nested child accessories. ### Method GET ### Endpoint /api/accessories ### Parameters #### Query Parameters - **limit** (integer) - Optional - Default: 50 - The number of accessories to retrieve. - **offset** (integer) - Optional - Default: 0 - The number of accessories to offset. - **expanded** (boolean) - Optional - Default: false - When true, includes nested child accessories in the top-level response, even if nested rows fall beyond the paginated cutoff. ### Responses #### Success Response (200) An array of accessories. ##### Response Schema: application/json ```json [ { "title": "string", "accid": "integer", "type": "string", "email": "string", "locationName": "string", "vendor": "string", "barcode": "string", "orderNumber": "string", "notes": "string", "available": "integer", "portalVisible": "integer", "quantity": "integer", "minQuantity": "integer", "used": "integer", "clid": "integer or null", "upid": "integer or null", "purchaseDate": "string ", "details": "object" } ] ``` #### Error Responses - **401** Unauthorized - **404** Not Found - **429** Too Many Requests ### Response Example (200) ```json [ { "title": "string", "accid": 1, "type": "string", "email": "string", "locationName": "string", "vendor": "string", "barcode": "string", "orderNumber": "string", "notes": "string", "available": 0, "portalVisible": 0, "quantity": 0, "minQuantity": 0, "used": 0, "clid": 0, "upid": 0, "purchaseDate": "2019-08-24T14:15:22Z", "details": {} } ] ``` ``` -------------------------------- ### Get all kit categories Source: https://www.reftab.com/api-docs Retrieves a list of all available kit categories. ```APIDOC ## GET /api/kitcategories ### Description Retrieves a list of all available kit categories. ### Method GET ### Endpoint /api/kitcategories ### Responses #### Success Response (200) An array of kit categories. ##### Response Schema: application/json - **name** (string) - The Category name, must be unique for account - **kitCategoryId** (integer) - This Kit Category's ID - **kitCount** (integer) - The number of kits using this category #### Error Responses - **401** Unauthorized - **404** Not Found - **429** Too Many Requests ### Response Example ```json [ { "name": "string", "kitCategoryId": 1, "kitCount": 0 } ] ``` ``` -------------------------------- ### Get all licenses Source: https://www.reftab.com/api-docs Retrieves a list of all licenses. Requires API authorization. ```APIDOC ## GET /api/licenses ### Description Retrieves a list of all licenses available in the system. ### Method GET ### Endpoint /api/licenses ### Responses #### Success Response (200) An array of licenses. Each license object contains details such as title, applicationId, cost, email, and more. #### Response Schema Array of license objects, each with the following properties: - **title** (string) - The License name (max 255 characters). - **applicationId** (integer) - The application this license belongs to. - **licid** (integer) - This License's ID. - **cost** (string) - The cost of the license (max 255 characters). - **email** (string) - Email to receive notifications on minimum reached or expiry approaching. - **locationName** (string) - Name of location of the license (max 255 characters). - **vendor** (string) - Vendor of the license (max 255 characters). - **productKey** (string) - Product key of the license (max 255 characters). - **orderNumber** (string) - Order number of the license (max 255 characters). - **notes** (string) - Any additional notes. - **licensee** (string) - Who the license is licensed to (max 255 characters). - **minSeats** (integer or string) - Minimum seats, if this is reached a notification will trigger. - **notificationDays** (integer or string) - How many days before expiry to notify. Accepts a single number or an array of numbers. - **portalVisible** (integer) - Whether license is visible in portal. - **seats** (integer or string) - Number of seats this license has. - **used** (integer) - Number of seats used. - **clid** (integer or null) - Location ID of the license, use null for global. - **purchased** (string) - Date Purchased (date-time format). - **expiration** (string) - Expiration Date (date-time format). - **cancelledAt** (string or null) - Date the customer marked the license as cancelled or non-renewing. - **cancelledBy** (integer or null) - User ID that cancelled the license. - **terminatedAt** (string or null) - Date the license access terminates. - **upid** (integer or null) - Upload ID of the thumbnail. - **details** (object) - An object which can be filled with Key/Values as setup in user fields for users & loanees. - **loans** (Array of objects) - A list of active loans for this license. - **assets** (Array of objects) - A list of assets this loan has been assigned to. #### Error Responses - **401** Unauthorized - **404** Not Found - **429** Too Many Requests ### Response Example (200) ```json [ { "title": "string", "applicationId": 1, "licid": 1, "cost": "string", "email": "string", "locationName": "string", "vendor": "string", "productKey": "string", "orderNumber": "string", "notes": "string", "licensee": "string", "minSeats": 0, "notificationDays": 0, "portalVisible": 0, "seats": 0, "used": 0, "clid": null, "purchased": "2019-08-24T14:15:22Z", "expiration": "2019-08-24T14:15:22Z", "cancelledAt": null, "cancelledBy": null, "terminatedAt": null, "upid": null, "details": {}, "loans": [ {} ], "assets": [ {} ] } ] ``` ``` -------------------------------- ### Response Sample for All Recurring Maintenances Source: https://www.reftab.com/api-docs An example of a successful response (200 OK) containing an array of recurring maintenance objects. ```json [ { "rrid": 1, "mnid": 1, "name": "string", "rrule": "string", "startDate": "2019-08-24T14:15:22Z", "startHour": 1440, "aids": [ "string" ], "statid": 1, "overdueStatid": 1, "uid": 1, "loanability": 1 } ] ``` -------------------------------- ### Create Location Response (200 OK) Source: https://www.reftab.com/api-docs This is a sample successful response when a location is created. It includes the newly created location's details and counts of associated assets and licenses. ```json { "name": "string", "address": "string", "phone": "string", "email": "string", "mainContact": "string", "notes": "string", "parent": 1, "reservationBookingWindowDays": 2147483647, "clid": 1, "upid": 1, "assetCount": 0, "licenseCount": 0, "accessoryCount": 0, "expiredLicenseCount": 0, "minimumAccessoryCount": 0, "categories": { }, "children": [ { "name": "string", "address": "string", "phone": "string", "email": "string", "mainContact": "string", "notes": "string", "parent": 1, "reservationBookingWindowDays": 2147483647, "clid": 1, "upid": 1, "assetCount": 0, "licenseCount": 0, "accessoryCount": 0, "expiredLicenseCount": 0, "minimumAccessoryCount": 0, "categories": { } } ] } ``` -------------------------------- ### Create Application Response (200 OK) Source: https://www.reftab.com/api-docs This is a successful response when an application is created. It includes the newly created application's details, such as its ID and other properties. ```json { "applicationId": 0, "name": "string", "vendorId": 0, "vendor": { "vendorId": 0, "name": "string", "legalName": "string", "website": "string" }, "category": "string", "description": "string", "website": "string", "status": "active", "upid": 0, "thumbnail": "string", "compliances": [ "string" ], "regions": [ "string" ], "owners": [ { } ], "ownersUids": [ 0 ], "roles": [ { "applicationRoleId": 0, "name": "string", "default": 0 } ], "cost": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "createdSource": "manual", "licenses": [ { "title": "string", "applicationId": 1, "licid": 1, "cost": "string", "email": "string", "locationName": "string", "vendor": "string", "productKey": "string", "orderNumber": "string", "notes": "string", "licensee": "string", "minSeats": 0, "notificationDays": 0, "portalVisible": 0, "seats": 0, "used": 0, "clid": 0, "purchased": "2019-08-24T14:15:22Z", "expiration": "2019-08-24T14:15:22Z", "cancelledAt": "2019-08-24T14:15:22Z", "cancelledBy": 0, "terminatedAt": "2019-08-24T14:15:22Z", "upid": 0, "details": { }, "loans": [ { } ], "assets": [ { } ] } ], "kbApplicationId": 0, "kbVendorId": 0 } ``` -------------------------------- ### Create Reservation Response (200 OK) Source: https://www.reftab.com/api-docs This is a sample successful response when a reservation is created. It includes details of the newly created reservation, such as its ID, associated assets, and status. ```json { "resid": 0, "lgid": 0, "accid": 0, "aid": "string", "licid": 0, "kid": 0, "categoryName": "string", "clientName": "string", "locationName": "string", "clid": 1, "end": "2019-08-24T14:15:22Z", "start": "2019-08-24T14:15:22Z", "notes": "string", "title": "string", "status": "string", "lnid": 0, "loan_uid": 0, "loaneeEmail": "string", "loaneeName": "string", "email": "string" } ``` -------------------------------- ### Create Loan Response (200 OK) Source: https://www.reftab.com/api-docs This is a sample JSON response for a successful loan creation. It includes details of the newly created loan, such as loan ID, group ID, asset details, due date, and status. ```json [ { "lid": 0, "lgid": 0, "accid": 0, "aid": "string", "licid": 0, "applicationRoles": [ { "applicationRoleId": 0, "name": "string" } ], "kid": 0, "categoryName": "string", "clientName": "string", "locationName": "string", "clid": 1, "due": "2019-08-24T14:15:22Z", "in": "2019-08-24T14:15:22Z", "out": "2019-08-24T14:15:22Z", "details": { }, "notes": "string", "title": "string", "status": "string", "signature": "string", "lnid": 0, "loan_uid": 0, "loanee": "string", "loaneeName": "string", "loanerEmail": "string", "returnerEmail": "string" } ] ``` -------------------------------- ### Get Verifications Response Sample Source: https://www.reftab.com/api-docs This is a sample JSON response for the get/verifications endpoint. It includes details about the verification, associated asset, accessory, and kit. ```json [ { "vid": 501, "lid": 1201, "created": "2025-02-20T04:50:00Z", "due": "2025-02-27T04:50:00Z", "submitted": "2025-02-21T09:15:00Z", "hash": "7d5e8c1b3c4a...", "publicId": "3f0fd07d81534cf4942c7f00b9f3e2a7", "status": "pending", "notes": "Please verify possession by Friday", "creator": 42, "loaneeLnid": 12, "loaneeUid": 34, "verificationPdf": "https://cdn.reftab.com/verification/report.pdf", "response": { "signature": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...", "condition": "good", "notes": "Device is in good condition", "possession": "yes" }, "asset": { "aid": "A-1001", "title": "MacBook Pro 14", "catName": "Laptops", "cid": 8, "clid": 3, "locationName": "HQ Warehouse", "thumbnail": "https://cdn.reftab.com/assets/thumb.png" }, "accessory": { "accid": 22, "title": "USB-C Dock", "clid": 3, "locationName": "HQ Warehouse", "thumbnail": "https://cdn.reftab.com/accessories/thumb.png" }, "kit": { "kid": 11, "name": "Onboarding Kit", "clid": 3, "thumbnail": "https://cdn.reftab.com/kits/thumb.png" } } ] ``` -------------------------------- ### Get Accessory Fields Response Sample Source: https://www.reftab.com/api-docs This is a sample JSON response for the 'Get accessory fields' endpoint. It shows the structure of an array containing accessory field objects. ```json [ { "name": "string", "type": "string", "afid": 1 } ] ``` -------------------------------- ### Create Application Source: https://www.reftab.com/api-docs Creates a new application within the Reftab system. Requires detailed information about the application, its vendor, and associated metadata. ```APIDOC ## Create an application ### Description Creates a new application. ### Method POST ### Endpoint /api/applications ### Parameters #### Request Body - **name** (string) - Required - <= 255 characters - **vendorId** (integer) - Required - - **category** (string) - Required - <= 255 characters - **description** (string) - Required - **website** (string) - Required - <= 255 characters - **status** (string) - Required - Enum: "active", "inactive", "decommissioned", "pending" - **vendor** (object or null) - **upid** (integer or null) - - **thumbnail** (string or null) - **compliances** (Array of strings) - **regions** (Array of strings) - **ownersUids** (Array of integers) - [ items ] - **roles** (Array of objects) - **kbApplicationId** (integer or null) - - **kbVendorId** (integer or null) - ### Request Example ```json { "name": "string", "vendorId": 0, "vendor": { "vendorId": 0, "name": "string", "legalName": "string", "website": "string" }, "category": "string", "description": "string", "website": "string", "status": "active", "upid": 0, "thumbnail": "string", "compliances": [ "string" ], "regions": [ "string" ], "ownersUids": [ 0 ], "roles": [ { "applicationRoleId": 0, "name": "string", "default": 0 } ], "kbApplicationId": 0, "kbVendorId": 0 } ``` ### Response #### Success Response (200) - **applicationId** (integer) - Required - - **name** (string) - Required - <= 255 characters - **vendorId** (integer) - Required - - **category** (string) - Required - <= 255 characters - **description** (string) - Required - **website** (string) - Required - <= 255 characters - **status** (string) - Required - Enum: "active", "inactive", "decommissioned", "pending" - **vendor** (object or null) - **upid** (integer or null) - - **thumbnail** (string or null) - **compliances** (Array of strings) - **regions** (Array of strings) - **owners** (Array of objects) - **ownersUids** (Array of integers) - [ items ] - **roles** (Array of objects) - **cost** (integer or null) - - **createdAt** (string) - - **updatedAt** (string) - - **createdSource** (string) - Enum: "manual", "browserExtension" - **licenses** (Array of objects (License)) - **kbApplicationId** (integer or null) - - **kbVendorId** (integer or null) - #### Response Example (200) ```json { "applicationId": 0, "name": "string", "vendorId": 0, "vendor": { "vendorId": 0, "name": "string", "legalName": "string", "website": "string" }, "category": "string", "description": "string", "website": "string", "status": "active", "upid": 0, "thumbnail": "string", "compliances": [ "string" ], "regions": [ "string" ], "owners": [ {} ], "ownersUids": [ 0 ], "roles": [ { "applicationRoleId": 0, "name": "string", "default": 0 } ], "cost": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "createdSource": "manual", "licenses": [ { "title": "string", "applicationId": 1, "licid": 1, "cost": "string", "email": "string", "locationName": "string", "vendor": "string", "productKey": "string", "orderNumber": "string", "notes": "string", "licensee": "string", "minSeats": 0, "notificationDays": 0, "portalVisible": 0, "seats": 0, "used": 0, "clid": 0, "purchased": "2019-08-24T14:15:22Z", "expiration": "2019-08-24T14:15:22Z", "cancelledAt": "2019-08-24T14:15:22Z", "cancelledBy": 0, "terminatedAt": "2019-08-24T14:15:22Z", "upid": 0, "details": {}, "loans": [ {} ], "assets": [ {} ] } ], "kbApplicationId": 0, "kbVendorId": 0 } ``` #### Error Responses - **400** Bad request - **401** Unauthorized ``` -------------------------------- ### Get all accessory categories Source: https://www.reftab.com/api-docs Retrieves a list of all accessory categories. ```APIDOC ## GET /api/accessorycategories ### Description Retrieves a list of all accessory categories. ### Method GET ### Endpoint /api/accessorycategories ### Responses #### Success Response (200) An array of accessory categories. ##### Response Schema: application/json - **name** (string) - The Category name, must be unique for account. - **accessoryCategoryId** (integer) - This Category's ID. - **accessoryCount** (integer) - The number of accessories using this category. #### Error Responses - **401** Unauthorized - **404** Not Found - **429** Too Many Requests ### Response Example (200) ```json [ { "name": "string", "accessoryCategoryId": 1, "accessoryCount": 0 } ] ``` ``` -------------------------------- ### Get all locations Source: https://www.reftab.com/api-docs Retrieves a list of all locations within the system. ```APIDOC ## GET /api/locations ### Description Retrieves a list of all locations within the system. ### Method GET ### Endpoint /api/locations ### Responses #### Success Response (200) An array of locations. ##### Response Schema: application/json Array of location objects, each containing: - **name** (string) - The location name (max 255 characters) - **address** (string) - The location Address (max 255 characters) - **phone** (string) - The location phone number (max 255 characters) - **email** (string) - The location email, must be a valid email address (max 255 characters) - **mainContact** (string) - The location's main contact, free text field - **notes** (string) - Any location notes - **parent** (integer or null) - The clid of the parent location - **reservationBookingWindowDays** (integer or null) - Maximum days into the future reservations can be scheduled for this location - **clid** (integer) - This location's ID - **upid** (integer) - Upload id for thumbnail image - **assetCount** (integer) - Count of assets within this immediate location - **licenseCount** (integer) - Count of licenses within this immediate location - **accessoryCount** (integer) - Count of accessories within this immediate location - **expiredLicenseCount** (integer) - Count of expired licenses within this immediate location - **minimumAccessoryCount** (integer) - Count of accessories at or below their minimums within this immediate location - **categories** (object) - An object of asset categories, keys are category IDs {cid}, and asset counts within this location - **children** (Array of objects) - An array of children locations #### Error Responses - **401** Unauthorized - **404** Not Found - **429** Too Many Requests ### Response Example (200) ```json [ { "name": "string", "address": "string", "phone": "string", "email": "string", "mainContact": "string", "notes": "string", "parent": 1, "reservationBookingWindowDays": 2147483647, "clid": 1, "upid": 1, "assetCount": 0, "licenseCount": 0, "accessoryCount": 0, "expiredLicenseCount": 0, "minimumAccessoryCount": 0, "categories": {}, "children": [ { "name": "string", "address": "string", "phone": "string", "email": "string", "mainContact": "string", "notes": "string", "parent": 1, "reservationBookingWindowDays": 2147483647, "clid": 1, "upid": 1, "assetCount": 0, "licenseCount": 0, "accessoryCount": 0, "expiredLicenseCount": 0, "minimumAccessoryCount": 0, "categories": {} } ] } ] ``` ``` -------------------------------- ### Create New License Field (Response Sample) Source: https://www.reftab.com/api-docs This is a sample JSON response after successfully creating a new license field. It includes the 'name', 'type', and the newly assigned 'lfid'. ```json { "name": "string", "type": "string", "lfid": 1 } ``` -------------------------------- ### Get all fields Source: https://www.reftab.com/api-docs Retrieves a list of all fields available in Reftab. ```APIDOC ## GET /api/fields ### Description Retrieves a list of all fields available in Reftab. ### Method GET ### Endpoint /api/fields ### Responses #### Success Response (200) An array of fields. ##### Response Schema: application/json Array of field objects, each containing: - **fid** (integer) - The field ID - **name** (string) - The field name (max 255 characters) - **type** (string) - The type of field (cannot be changed after set) - **choices** (string) - Choices for menu type fields - **required** (integer) - 0 for false, 1 for true - **noDuplicates** (integer) - 0 for false, 1 for true - **expression** (integer) - 0 for false, 1 for true - **permission** (string) - Edit/View Permission on resource #### Error Responses - **401** Unauthorized - **404** Not Found - **429** Too Many Requests ```