Skip to content

Developer Function: Script: $p.apiDeptsGet

Overview

This explains the methods that allow you to obtain values ​​using an Ajax POST request. Use this when you want to obtain department information.

Preparation

Please Create an API key before performing API operations.

Syntax

JavaScript
$p.apiDeptsGet({
    id: <deptID>,
    done: <any operation>,
    fail: <any operation>,
    always: <any operation>
});

Description of Each Parameter

Parameter name Description
Dept ID Dept ID for which you want to obtain information
Optional operation Processing when API communication is successful (done: required), when it fails (fail: optional), when it is completed (always: optional)

Example of Use

JavaScript
$p.apiDeptsGet({
    id: 123,
    done: function (data) {
        console.log(data);
        console.log('Department information was successfully obtained.');
    },
    fail: function () {
        console.log('Department information was not successfully obtained.');
    },
    always: function () {
        console.log('Department information retrieval completed.');
    }
});