支払方法一覧取得
GET
/payments
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-b2b/payments?limit=10&page=1&name=%E8%AB%8B%E6%B1%82%E6%9B%B8%E6%89%95%E3%81%84&payment_code=10&is_usage=true';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/payments?limit=10&page=1&name=%E8%AB%8B%E6%B1%82%E6%9B%B8%E6%89%95%E3%81%84&payment_code=10&is_usage=true' \ --header 'Authorization: Bearer <token>'支払方法の一覧を取得します。
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”limit
integer
取得件数
page
integer
ページ
name
string
名前で絞り込み
Example
請求書払いpayment_code
integer
支払コードで絞り込み
Example
10is_usage
boolean
利用中フラグで絞り込み
Example
trueResponses
Section titled “Responses”取得成功
Media typeapplication/json
Array
PaymentResponseobject
id
支払方法ID
string format: uuid
name
名前
string
displayName
表示名
string
paymentCode
支払コード
integer
isUsage
利用中フラグ
true: 利用中false: 未利用
boolean
Examples
Exampledefault
[ { "id": "12345678-1234-1234-1234-1234567890ab", "name": "請求書払い", "displayName": "請求書払い", "paymentCode": 10, "isUsage": true }, { "id": "12345678-1234-1234-1234-1234567890cd", "name": "クレジットカード決済", "displayName": "クレジットカード決済", "paymentCode": 20, "isUsage": false }, { "id": "12345678-1234-1234-1234-1234567890ef", "name": "代金引換", "displayName": "代金引換", "paymentCode": 40, "isUsage": false }]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}