All URIs are relative to https://api.freee.co.jp/api/1
Method | HTTP request | Description |
---|---|---|
createItem | POST /items | 品目の作成 |
getItems | GET /items | 品目一覧の取得 |
ItemsCreateResponse createItem(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.ItemsApi();
var opts = {
'parameters': new FreeeAccountingClient.Parameters4() // Parameters4 | 品目の作成
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.createItem(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
parameters | Parameters4 | 品目の作成 | [optional] |
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json
ItemsIndexResponse getItems(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.ItemsApi();
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.getItems(companyId, callback);
Name | Type | Description | Notes |
---|---|---|---|
companyId | Number | 事業所ID |
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json