All URIs are relative to https://api.freee.co.jp/api/1
Method | HTTP request | Description |
---|---|---|
createSection | POST /sections | 部門の作成 |
destroySection | DELETE /sections/{id} | 部門の削除 |
getSections | GET /sections | 部門一覧の取得 |
updateSection | PUT /sections/{id} | 部門の更新 |
SectionsCreateResponse createSection(opts)
部門の作成
var FreeeAccountingClient = require('freee-accounting-client');
var defaultClient = FreeeAccountingClient.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = accessToken; // assign access token here.
var apiInstance = new FreeeAccountingClient.SectionsApi();
var opts = {
'parameters': new FreeeAccountingClient.SectionParams() // SectionParams | 部門の作成
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.createSection(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
parameters | SectionParams | 部門の作成 | [optional] |
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json
destroySection(id, opts)
部門の削除
var FreeeAccountingClient = require('freee-accounting-client');
var defaultClient = FreeeAccountingClient.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = accessToken; // assign access token here.
var apiInstance = new FreeeAccountingClient.SectionsApi();
var id = 56; // Number |
var opts = {
'parameters': new FreeeAccountingClient.Parameters1() // Parameters1 | 部門の削除
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.destroySection(id, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ||
parameters | Parameters1 | 部門の削除 | [optional] |
null (empty response body)
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json
SectionsIndexResponse getSections(companyId)
部門一覧の取得
var FreeeAccountingClient = require('freee-accounting-client');
var defaultClient = FreeeAccountingClient.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = accessToken; // assign access token here.
var apiInstance = new FreeeAccountingClient.SectionsApi();
var companyId = 56; // Number | 事業所ID
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getSections(companyId, callback);
Name | Type | Description | Notes |
---|---|---|---|
companyId | Number | 事業所ID |
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json
SectionsUpdateResponse updateSection(id, opts)
部門の更新
var FreeeAccountingClient = require('freee-accounting-client');
var defaultClient = FreeeAccountingClient.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = accessToken; // assign access token here.
var apiInstance = new FreeeAccountingClient.SectionsApi();
var id = 56; // Number |
var opts = {
'parameters': new FreeeAccountingClient.SectionParams() // SectionParams | 部門の更新
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.updateSection(id, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ||
parameters | SectionParams | 部門の更新 | [optional] |
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json