Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Latest commit

 

History

History
225 lines (150 loc) · 5.54 KB

SectionsApi.md

File metadata and controls

225 lines (150 loc) · 5.54 KB

FreeeAccountingClient.SectionsApi

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} 部門の更新

createSection

SectionsCreateResponse createSection(opts)

部門の作成

Example

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);

Parameters

Name Type Description Notes
parameters SectionParams 部門の作成 [optional]

Return type

SectionsCreateResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json

destroySection

destroySection(id, opts)

部門の削除

Example

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);

Parameters

Name Type Description Notes
id Number
parameters Parameters1 部門の削除 [optional]

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json

getSections

SectionsIndexResponse getSections(companyId)

部門一覧の取得

Example

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);

Parameters

Name Type Description Notes
companyId Number 事業所ID

Return type

SectionsIndexResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json

updateSection

SectionsUpdateResponse updateSection(id, opts)

部門の更新

Example

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);

Parameters

Name Type Description Notes
id Number
parameters SectionParams 部門の更新 [optional]

Return type

SectionsUpdateResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json