店舗マスタ店舗更新
curl -X POST -H 'content-type: application/x-www-form-urlencoded' \ -d 'access_token=xxx&refresh_token=xxx&wait_flag=1&shop_id=1&shop_last_modified_date=xxx&data=xxx' \ https://api.next-engine.org/api_v1_master_shop/update// POST /api_v1_master_shop/update - 店舗マスタ店舗更新const params = new URLSearchParams({ access_token: '<access_token>', shop_id: '<shop_id>', shop_last_modified_date: '<shop_last_modified_date>', data: '<data>',})const res = await fetch('https://api.next-engine.org/api_v1_master_shop/update', { method: 'POST', headers: { 'content-type': 'application/x-www-form-urlencoded' }, body: params,})const json = await res.json()if (json.result !== 'success') throw new Error(json.message ?? json.code)console.log(json.data)# POST /api_v1_master_shop/update - 店舗マスタ店舗更新import requests
params = { 'access_token': '<access_token>', 'shop_id': '<shop_id>', 'shop_last_modified_date': '<shop_last_modified_date>', 'data': '<data>',}res = requests.post( 'https://api.next-engine.org/api_v1_master_shop/update', data=params,)json = res.json()if json['result'] != 'success': raise RuntimeError(json.get('message') or json.get('code'))print(json.get('data'))<?xml version="1.0" encoding="utf-8"?><root> <shop> <shop_kana>ラクテン</shop_kana> </shop></root>Request Bodyrequired
Section titled “Request Bodyrequired”object
Access_token取得により取得した値
Access_token取得により取得した値 / 【指定してaccess_tokenの有効期限が切れた場合】 正常に出力パラメータが設定されaccess_tokenとrefresh_tokenが新しい値に更新されます 【省略してaccess_tokenの有効期限が切れた場合】 出力パラメータ「result」の値がredirectになります(成功時以外の出力パラメータ参照)
1:メイン機能過負荷でも可能な限りエラーにせず実行1以外:メイン機能過負荷の場合、003002のエラーを返却 / 詳細はパラメータ共通事項「待機フラグについて」を参照して下さい / 省略時: 1以外とする
店舗ID / 更新する店舗のshop_id
最終更新日 / 更新する店舗のshop_last_modified_date API実行時にメイン機能またはアプリで、店舗が更新されていないかを確認するために利用します メイン機能またはアプリで店舗が更新されている場合はエラーになります エラーになったら再度、店舗を検索してAPIを実行して下さい
作成する店舗情報のXML / 詳細はこちらを参照
Example generated
access_token=example&refresh_token=example&wait_flag=example&shop_id=example&shop_last_modified_date=example&data=exampleResponses
Section titled “Responses”実行結果 (result が success / error / redirect のいずれか)
object
success / success以外の場合の出力パラメータは成功時以外の出力パラメータ参照
入力パラメータで指定したaccess_token/新たに発行されたaccess_token / 有効なrefresh_tokenを指定してaccess_tokenの有効期限がきれた場合、新たに発行(この時点から1日有効)されたaccess_tokenになります
入力パラメータで指定したrefresh_token/新たに発行されたrefresh_token / access_tokenが新しく発行された場合、新たに発行(この時点から3日有効)されたrefresh_tokenになります
Example
{ "result": "success", "access_token": "xxx", "access_token_end_date": "2017-04-19 11:21:13", "refresh_token": "xxx", "refresh_token_end_date": "2017-04-21 11:21:13"}クライアントエラー (HTTP ステータス自体は 200 + result=error で返ることが多い)
失敗時の応答。パラメータ共通事項の「成功時以外の出力パラメータ」を参照
object
Error(code にエラー原因のメッセージコード、message にエラーメッセージ)または redirect(再ログインのため uid・state 取得にリダイレクトする)
エラーコード
object
Example generated
{ "result": "example", "code": "example", "message": [ {} ]}