税ルール一覧取得
GET
/tax_rules
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-b2b/tax_rules?limit=10&page=1&sort=applyAt%3Adesc';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-b2b/tax_rules?limit=10&page=1&sort=applyAt%3Adesc' \ --header 'Authorization: Bearer <token>'税ルールの一覧を取得します。
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”limit
integer
取得件数
page
integer
ページ
sort
string
ソート
applyAt: 適用開始日時
Example
applyAt:descResponses
Section titled “Responses”取得成功
Media typeapplication/json
Array
TaxRuleResponseobject
id
税ルールID
string format: uuid
taxRate
税率(%)
integer
calcRule
端数処理ルール
0: 処理無し1: 四捨五入2: 切り捨て3: 切り上げ
integer
taxCalcType
税計算タイプ
2: 明細単位3: 伝票単位
integer
applyAt
適用開始日時[YYYY-MM-DDThh:mm:ssTZD]
string format: date-time
Examples
Exampledefault
[ { "id": "12345678-1234-1234-1234-1234567890ab", "taxRate": 10, "calcRule": 2, "taxCalcType": 3, "applyAt": "2019-10-01T00:00:00+09:00" }, { "id": "12345678-1234-1234-1234-1234567890cd", "taxRate": 8, "calcRule": 2, "taxCalcType": 3, "applyAt": "2014-04-01T00:00:00+09:00" }, { "id": "12345678-1234-1234-1234-1234567890ef", "taxRate": 5, "calcRule": 2, "taxCalcType": 3, "applyAt": "1997-04-01T00:00:00+09:00" }]Headers
Section titled “Headers”Link
string
<前ページURI>; rel="prev", <次ページURI>; rel="next"
- 入力チェックエラーの場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
string
status
integer
Examples
{ "type": "about:blank", "title": "Bad Request", "detail": "request_json:[limit]は100以下の数字を指定してください。", "status": 400}{ "type": "about:blank", "title": "Bad Request", "detail": "request_json:[page]は1以上の数字を指定してください。", "status": 400}