mercari shops API reference docs

GraphQL API documentation for mercari shops

API Endpoints
https://api.mercari-shops.com/v1/graphql
Headers
# Your API Personal Access Token here
Authorization: Bearer <YOUR_API_PERSONAL_ACCESS_TOKEN>

Endpoints

Production API Endpoint

https://api.mercari-shops.com/v1/graphql

Sandbox API Endpoint

https://api.mercari-shops-sandbox.com/v1/graphql

Authentication

Personal API Access Token

Personal API Access Token is a token that mercari shops API identifies which shop sent a request. You can issue your Personal API Access Token on your shop administration page on mercari shops service.

Authorization Header

You need to add your Personal API Access Token into your requests.

Authorization: Bearer <YOUR_PERSONAL_API_ACCESS_TOKEN>

User-Agent

You must set a correct User-Agent to each request header for both development and production environment.

*We plan to restrict requests that do not specify the correct User-Agent during 2024.

User-Agent Format

<API_CLIENT_NAME>/<VERSION>

e.g., EXAMPLE_SHOP/1.0.0

  • API_CLIENT_NAME: This value is assigned to each company that uses the API. Mercari send you this value at the time of contract.
  • VERSION: This is a string value indicating version of your API client.
    • The format of the version number is up to you (e.g., "1.0.0", "2023-10-25", etc.). If your company assigns a version number to each system update, please set the same value to the User-Agent version number so that we can check it as well and facilitate communication when we receive inquiries.
    • If there is no specific version number to be set, please specify "0.0.0" as a fixed value.

Webhook

If you have created a webhook resource by using createWebhook mutation, you can receive the topic data as JSON at the endpoint you specified.

Expected status codes

Sending topic data will be retried for several days until your endpoint returns one of the following HTTP status codes:

  • 102
  • 200
  • 201
  • 202
  • 204

Static outbound IP addresses

⚠️ Deprecation Notice: The old static IP addresses listed below will be deprecated on 4th August 2025. Please update your firewall rules to use the new IP address ranges.

Old IP addresses (deprecated 2025/08/04):

  • Sandbox
    • 34.85.79.96
    • 34.84.172.252
  • Production
    • 34.84.173.38
    • 104.198.113.203

New IP address ranges:

Environment Public IP addresses
Sandbox 103.123.182.32/27, 103.123.182.96/27, 103.123.182.192/27
Production 103.123.182.0/27, 103.123.182.64/27, 103.123.182.128/27, 103.123.182.160/28
Notes
  • The addresses above are CIDR notation. For instance, 103.123.182.0/27 consists of 32 IP addresses from 103.123.182.0/32 to 103.123.182.31/32.
  • Please allow only these IP addresses for the specified webhook endpoints to prevent receiving unexpected requests.

Topics

order_created

order_created is sent to your endpoint when a buyer purchases your product.

order_paid

order_paid is sent to your endpoint when a buyer has done their payment. This topic is NOT sent when a buyer purchases your product with the payment method which causes payment and order-creation at the same time like credit card payment.

order_canceled

order_canceled is sent to your endpoint when an order is canceled.

product_administrator_deleted

product_administrator_deleted is sent to your endpoint when an product is deleted by Mercari Shops administrator.

transactionmessage_created

transactionmessage_created is sent to your endpoint when a transactionmessage is sent to your shop by a buyer.

Payloads

order_created

key type nullable description
order_id string No A globally-unique identifier
shop_id string No A globally-unique identifier
topic string No order_created
product OrderProduct No A product that a buyer purchased
paid boolean No It becomes true if the payment has already been done.
created_at string No The time when the order created. Its date format is RFC 3339.
paid_at (deprecated) string Yes The time when the payment has been done. Its date format is RFC 3339. This field is set only when paid field is true.

order_paid

key type nullable description
order_id string No A globally-unique identifier
shop_id string No A globally-unique identifier
topic string No order_paid
product OrderProduct No A product that a buyer purchased
paid_at string No The time when the payment has been done. Its date format is RFC 3339.

order_canceled

key type nullable description
order_id string No A globally-unique identifier
shop_id string No A globally-unique identifier
topic string No order_canceled
product OrderProduct No A product that a buyer purchased
canceled_at string No The time when the order is canceled. Its date format is RFC 3339.

product_administrator_deleted

key type nullable description
shop_id string No A globally-unique identifier
topic string No product_administrator_deleted
product Product No A product that a seller registered
deleted_at string No The time when the product is deleted. Its date format is RFC 3339.

transactionmessage_created

key type nullable description
order_id string No A globally-unique identifier. You can query order, orders to get related TransactionMessages using this value.
shop_id string No A globally-unique identifier
topic string No transactionmessage_created
created_at string No The time when the transactionmessage is created. Its date format is RFC 3339.

Product

key type nullable description
product_id string No A globally-unique identifier
name string No Product's name

OrderProduct

key type nullable description
product_id string No A globally-unique identifier
name string No Product's name
price number No Product's price
variant Variant Yes It becomes null if the product doesn't have a variant

Variant

key type nullable description
variant_id string No A globally-unique identifier
name string No Variant's name
sku_code string Yes Variant's SKU code
jan_code string Yes Variant's JAN code

Rate limiting

The GraphQL API is rate-limited based on calculated query cost, which means you should consider the cost of requests over time, rather than the number of requests. The rate limit is 10,000 points per hour currently.

Note: The current calculation method and rate-limit are subject to change

Cost calcluation

By default, a field's cost is based on what the field returns. The cost is basically 1 cost per GraphQL field but the cost of some fields might be higher than usual.

FieldType Cost
Union 1
Interface 1
Object 1
List 1
Scalar 0
Enum 0

Pagination queries are returned using the connection model. The connection field must specify the number of fetches in the first parameter, and the "number of fetches × children node" becomes the overall complexity of the connection.

Note: The maximum query cost per request is 2000.

The final score is calculated by following steps.

  1. Calculate the query cost as explained in the previous section
  2. Divide the number by 100 and round the result to get the final aggregate cost (minimum 1)

For example: If the query cost is 1001, the final score will be 10.

Note: The final consumption cost will be calculated by the system based on this score.

Headers

You can check your ratelimit's consumption with responded headers.

Header description
X-Ratelimit-Limit The number indicating the assigned rate limit points in an hour
X-Ratelimit-Remaining The number indicating the remaining points you can use in this period
X-Ratelimit-Reset The number indicating the time (seconds) before your rate limit is reset
X-RateLimit-Complexity The number indicating the complexity of the query
X-RateLimit-Used The number indicating the actual consumption cost you used for the query

Error

When there are no points available, the following error is returned with status code 400.

{
  "error": {
    "errors": [
      {
        "message": "too many requests",
        "extensions": {
          "code": "TOO_MANY_REQUESTS",
          "details": {
            "currentLimit": number,
            "remainingCost": number,
            "requestedCost": number
           }
        }
      }
    ]
  }
}

FAQ(Authentication)

Q: Sandboxアクセストークンの無効化と再発行は可能ですか?

トークンが流出した場合、個別対応により新しいトークンの発行と古いトークンの無効化が可能です。

Q: Sandboxのアクセストークンを本番環境で使用できますか?

Sandboxと本番環境は完全に独立しており、アクセストークンを相互利用できません。

Q: APIアクセストークンを複数発行して用途別に使い分けできますか?

最大10個まで発行可能です。注文取得用、価格更新用、在庫更新用など用途別の使い分けができます。ただし、レート制限はショップ単位の合計値で計算されます。

Q: APIアクセストークンに有効期限はありますか?

APIアクセストークンに有効期限はありません。ただし、以下の場合にトークンが使用できなくなります:

  • トークンを発行したアカウントが削除された場合
  • 管理画面からトークンが削除された場合

Q: 本番環境のアクセストークンをSandboxで使用できますか?

本番環境とSandboxは完全に独立しており、アクセストークンを相互利用できません。

Q: Sandbox環境で固定IPアドレスを持たない場合のアクセス方法はありますか?

Sandbox環境でも固定IPアドレスでの登録が必要です。固定IPアドレスの取得をお願いいたします。

Q: 申請可能なIPアドレスの要件を教えて下さい

日本国内の固定IPアドレスである必要があります。他社と共有しているIPアドレスは使用不可となります。

Q: IPアドレスの範囲指定は可能ですか?

IPアドレスの範囲指定はできません。個別のIPアドレス(ホストアドレス)での申請をお願いします。

Q: APIにアクセスすると 404 NotFound エラーが返却されました

申請いただいていないIPアドレスからのリクエストに対しては 404 NotFound が返却されます。必要に応じてIPアドレスの申請をお願いします。

Q: 申請済みのIPアドレスでアクセスしても 404 NotFound エラーが返却されます

許可IPアドレスはSandbox環境と本番環境それぞれで管理されています。使用中のIPアドレスが対象の環境で許可されているかをご確認ください。

Q: クラウドサービスからAPIにアクセスすることはできますか?

送信元が国内の固定IPアドレスであれば可能です。

Q: User-Agentの設定方法を教えてください

{API_CLIENT_NAME}/{バージョン}の形式で設定してください。API_CLIENT_NAMEはAPI利用契約時にメルカリから提供される事業者識別名で、ショップ名ではありません。バージョンは自由なフォーマットで、アプリケーションのバージョン番号や日付など任意の文字列を設定できます(例:CLIENTNAME/1.0.0CLIENTNAME/2023-10-25)。

FAQ(Error)

Q: GraphQLでエラーが発生した場合、ステータスコードはどうなりますか?

GraphQLでは基本的に200ステータスでエラー情報をレスポンスに含めて返却します。エラー情報はerrorsオブジェクトに格納されます。

ただし、GraphQLの処理を実行する前段階でエラーが発生した場合、HTTPレベルのエラーを示すレスポンスコードを返却します。

  • 400エラー: JSON構文エラーやクエリ構文エラー時
  • 401エラー: 認証エラー時
  • 404エラー: IPアドレス制限等のアクセス拒否時

Q: HTTP 400 Bad Request エラーが発生しました

以下の原因が考えられます。

JSON構文エラー

JSON文字列内に不正な制御文字が含まれている場合に発生します。構文に問題ないことや不正な制御文字(ダブルクオーテーションが2つ連続で使われている等)を確認してください。

恐れ入りますが構文エラーの原因を個別にお答えすることはできかねますので、お客さまにて構文チェックをお願い致します。

クエリ構文エラー

GraphQLクエリの構文に問題がある場合に発生します。

恐れ入りますが構文エラーの原因を個別にお答えすることはできかねますので、お客さまにて構文チェックをお願い致します。

レート制限の上限到達

一時的にレート制限の上限に達したためエラーが発生している可能性があります。

Q: HTTP 401 Unauthorized エラーが発生しました

以下の原因が考えられます。

Authorizationヘッダーの指定ミス

アクセストークンをAuthorizationヘッダーに指定する必要があります。正しく指定されているかを確認してください。

アクセス先の環境とアクセストークンの組み合わせが間違っている

Sandbox用トークンで本番環境にアクセスすることはできません。逆も同様です。

アクセストークンを発行したアカウントが削除された

アカウントが削除されるとアクセストークンは無効化されます。アカウントの状態をご確認ください。

Q: HTTP 404 Not Found エラーが発生しました

以下の原因が考えられます。

未登録IPアドレスからのアクセス

事前申請していないIPアドレスからのアクセスの場合、セキュリティ上の理由で404エラーが返されます。

GraphQLスキーマを取得する際も同様に、事前申請したIPアドレスからアクセスする必要があります。

環境とIPアドレスの不一致

Sandbox用IPで本番環境にアクセス、または本番用IPでSandbox環境にアクセスしている場合に発生します。

Q: DEADLINE_EXCEEDED エラーが発生しました

一時的なタイムアウトが発生した可能性があります。

画像URL読み込み時のタイムアウト

商品登録時に指定した画像URLのサーバーが不安定な場合に発生します。画像URLが正常にアクセスできることを確認してください。

システムの一時的な問題

弊社側での一時的な問題の可能性が高いです。基本的には一時的なものなので、リトライで解決する場合が多いです。

Q: INTERNAL_SERVER_ERROR エラーが発生しました

システムが一時的に不安定な場合に返却されるエラーです。基本的には一時的なものなので、リトライで解決する場合が多いです。

Q: 商品登録・更新時(createProduct / updateProduct / updateProducts)にエラーが発生しました

FAILED_PRECONDITION

処理の前提条件を満たさなかった場合に返却されます。例えば、下記の原因が考えられます。

  • 削除済み商品を更新する
  • タイムセール設定中の商品で価格変更を行う
  • 送料設定IDに誤った値を指定する(ShippingConfiguration.idを使用してください)
  • 存在しない商品IDを指定する
  • 同一商品を並行で更新しようとした

BAD_USER_INPUT

APIが不正な値を受信した際に返却されます。例えば、下記の原因が考えられます。

  • リクエストパラメータのバリデーションで問題が発生した(例: 9999を超える在庫数を指定した)
  • 指定された画像URLのContentTypeが正しくない
  • 画像を提供しているサーバがメンテナンス中になっていた(画像ではなくHTMLを返却した)
  • shippingConfigurationIdを指定しているがshippingPayerがSELLERになっている

Q: 在庫更新時(updateProductVariant / updateProductVariants)にエラーが発生しました

  • updateProductVariantsで指定できる件数の上限は20件です
  • stockQuantityは9999が上限値になります

Q: テスト注文時(debugCreateOrder)にエラーが発生しました

  • 商品のステータスが「非公開(UNOPENED)」になっている(「公開(OPENED)」にする必要があります)
  • 支払金額と商品価格が一致していない(PaymentMethodのamountは商品価格と一致させてください)
  • 本番環境でdebugCreateOrderを実行している(Sandbox環境でのみ利用可能です)

Q: 「Getting shop data failed」エラーが発生しました

システムの一時的な不安定状態またはアクセストークンに紐づくスタッフアカウントが削除されている場合に発生します。リトライをお試しください。

Q: 「product status cannot be OPENED if shop is not OPEN」エラーが発生しました

ショップが事務局により利用制限されている場合に発生します。管理画面で「事務局により利用制限中です」という表示がないか確認し、カスタマーサポートにお問い合わせください。

Q: 「failed to get sender address」エラーが発生しました

偶発的なエラーです。同じパラメータで再度リクエストしてください。

FAQ(Product)

Q: updateProductsで商品画像を更新できますか?

updateProductsはimageUrlsの指定に対応していません。updateProduct(単一商品更新)で画像を更新してください。

Q: API経由で商品登録後、すぐに管理者削除されるのはなぜですか?

禁止キーワードによる自動通報システムが原因の可能性があります。

Q: productsクエリのfirstパラメータの最大値はいくつですか?

firstパラメータの最大値は200です。

Q: APIでブランド名を削除する方法はありますか?

現在、APIでのブランド名削除機能は提供していません。既存商品を削除して再登録するか、管理画面での手動操作をお願いいたします。

Q: updateProductで画像更新が不要な場合、処理時間を短縮できますか?

imageUrlsを省略することで処理時間を大幅に短縮できます。画像については更新がスキップされます。

Q: CSVの「original_product_id」はAPIのorderの何に対応しますか?

CSVの「original_product_id」はAPIのOrderVariant.skuCodeに対応します。

Q: APIで商品のいいね数や累積アクセス数を取得できますか?

APIでは商品のいいね数および累積アクセス数は取得できません。

Q: APIでの商品登録時にカテゴリーは必須ですか?

APIでは必須項目です。

Q: 管理画面でアップロードした画像のURLで、ファイル名部分は指定できますか?

画像URLのファイル名部分はメルカリShops側で自動生成されるため、指定はできません。

Q: productsクエリで在庫切れ商品を除外するパラメータはありますか?

現在在庫切れ商品を除外するパラメータは提供されていません。

Q: 商品管理コードはAPIのどのフィールドに対応していますか?

商品管理コードはProductVariantのskuCodeフィールドに対応しています。

Q: product_administrator_deleted Webhookの動作をSandbox環境でテストできますか?

現在、管理者削除のテスト方法は提供されていません。

Q: updateProductVariantで在庫を0に設定しましたが、その後に注文が入りました

在庫更新後に別のAPIリクエストで在庫が復活した可能性があります。並行で在庫変更が実行されていないかをご確認ください。

Q: updateProductで在庫数を変更できません

updateProductでは在庫の更新はできません。以下のmutationを使用してください。

Q: product APIでstatusがOPENEDと返されますが、実際の商品は売り切れています

ProductStatusは在庫状況ではなく、商品の公開状態を表します。

Q: 離島地域への送料設定は可能ですか?

現在は離島地域専用の送料設定は対応していません。

Q: JANコード(UPC、EAN)をAPIで設定することは可能ですか?

APIでJANコード等の商品識別コードを設定できます。CreateProductInputの該当フィールドにJANコードや商品管理コードを指定してください。

Q: 商品の状態の詳細説明文がAPIで出品すると表示されません。

商品状態の説明文は、メルカリ(C2C)で出品した際のみ表示されます。

Q: API経由で価格更新すると「サイズ」情報が消えてしまいます

APIを使用した場合、サイズ情報の保持・取得・更新はできません。

代替案として、バリエーション名にサイズ情報を含める方法があります(例:「赤 M」のようにvariant.nameにサイズを含めて設定)。

Q: 効率的に在庫を更新する方法はありますか?

バッチ処理を活用してください。updateProductVariant(1SKUずつ)よりupdateProductVariants(最大20SKUずつ)が効率的です。

Q: 商品IDの最低文字数を教えてください

最低文字数は保証していません。

Q: APIで在庫量を絶対値で反映させることはできますか?

はい、可能です。下記のmutationをご利用ください。

  • updateProductVariant(単体の在庫を指定した数にする)
  • updateProductVariants(複数の在庫を指定した数にする)

Q: 商品画像の要件を教えて下さい

  1. 画像サイズ制限
    • 最大10MBまで対応しています
  2. 対応フォーマット
    • image/gif
    • image/webp
    • image/png
    • image/jpeg

Q: 非公開状態のショップでもAPI経由で商品更新できますか?

はい、可能です。ショップが非公開でもAPIで商品情報を更新できます。

Q: 商品が登録されたか確認する方法は?

SKUコードを使用して確認してください。productVariantクエリでSKUコードを指定して検索できます。

Q: タイムセール中の商品をAPIで更新できますか?

商品価格以外の項目は更新可能です。

Q: タイムセールが終了した商品の価格を更新できません

タイムセール終了直後は価格変更できません。システムの後処理が完了してから更新可能になるため、多少のラグがあります。大規模セール終了時は処理に時間がかかる場合があります。

Q: shippingPayerを変更した場合、タイムセールの販売実績に影響はありますか?

本体価格を変更しなければ、タイムセールを設定するための販売実績はリセットされません。

Q: 管理画面で設定した送料IDをAPIで取得できますか?

管理画面で設定した送料IDは、API上ではShippingConfigurationのdisplayIdフィールドに記録されています。CreateProduct/UpdateProductで送料設定を指定する場合は、ShippingConfigurationのdisplayIdではなくidフィールドを指定してください。

Q: 大量の商品を出品するために並列処理を増やした場合、Rate Limit以外の制限はありますか?

Rate Limit以外に制限はありません。

Q: 送料別設定の場合、totalPriceや送料はどのように記録されますか?

送料負担先に関わらず、totalPriceには配送料が含まれます。OrderのbuyerShippingFeeに購入者負担の送料が記録されます。

Q: API経由で商品説明に改行を入れる方法を教えてください

\nを使用して改行を入力してください。

Q: API連携で1商品2〜3秒かかり、大量の商品を更新するのに時間がかかります

一括更新API(updateProductsupdateProductVariants)を使用し、並列処理を実装してください。それぞれ最大20件まで一括処理できます。

Q: APIで取得する商品価格とWeb上の価格が異なります

タイムセール期間中はAPIは値引き後の表示価格を返します。タイムセール終了後は元の価格に戻ります。

Q: APIで商品の税率を取得できますか?

メルカリShopsでは商品の税率情報は保持していないため、APIで取得することはできません。税率情報は販売者自身で管理してください。

Q: CreateProduct Mutationでエラーレスポンスが返されたにも関わらず、商品が「販売中」状態になっています

エラーが発生しても商品が登録されていることがあります。商品が登録されたかはproductVariantクエリでSKUコードを指定して検索可能です。

Q: 複数SKUを登録した商品の場合、SKUごとにproduct_idが発行されますか?

いいえ、1つのproduct_idに対して複数のproductVariantが作成されます。各productVariantは個別のidを持ちます。

Q: API経由で商品画像を変更した場合の反映タイムラグはどの程度ですか?

ほぼリアルタイムで反映されます。APIレスポンス時点で更新は完了しています。

Q: 商品情報を出品状況や在庫数で絞り込みできますか?

出品状況や在庫数での絞り込み機能は提供されていません。

Q: 画像アップロードAPIは存在しますか?

画像を直接アップロードするAPIは提供されていません。API経由で商品を登録する際は、画像のURLを指定して商品を作成してください。

FAQ(Order)

Q: 注文ステータスを「発送済」にする方法を教えてください

completeOrderを実行することで注文ステータスが更新されます。

Q: 注文者のフリガナが注文ごとに異なっています

正常な動作です。注文者が複数の発送先住所を登録している可能性があります。

Q: 注文者を特定するID等はありますか

特定する方法はありません。Order.customerInfo.nicknameから注文者のニックネームは取得可能ですが、ニックネームはユニークではありません。

Q: ポイント利用時の売上への影響はありますか?

ショップ側がポイントを考慮する必要はありません。購入者がポイントで支払いをした場合でも、ショップ側に入金されるのは日本円となります。

Q: 配送先情報(shipping)がnullになることはありますか?

はい、配送先情報がnullになる場合があります。

  • 商品が売れた後でも、購入者の支払いが完了していない段階ではnullになります
  • 購入者が支払いを完了すると、配送先情報が表示されるようになります
  • 匿名配送の場合、nullの状態を維持します

Q: 「WAITING_FOR_PAYMENT」が一時的に発生する支払い方法はありますか?

WAITING_FOR_PAYMENTに移行するのはコンビニ払いのときのみです。

Q: メルカリクーポン利用時のorderCoupon情報はどうなりますか?

orderCouponにはメルカリShopsのクーポン情報のみが反映され、メルカリのクーポン情報は反映されません。

Q: OrderIDは複数店舗間でユニークですか?

はい、OrderIDは複数店舗間でもユニークです。複数店舗を扱う場合でもOrderIDの重複は発生しません。

Q: completeOrder mutationはいつ使用しますか?

出品者の発送処理が完了した際(配送業者への引き渡し完了時)に実行してください。

Q: 取引メッセージのステータス(未返信・送信済・完了)を取得できますか?

現時点では対応していません。

Q: メルカリが発行したクーポン利用の有無を判別したいです

現時点でメルカリから発行されたクーポンの情報はAPIで取得できません。ショップから発行されたクーポンのみorderCouponフィールドで確認可能です。

Q: 取引メッセージが重複して送信されているようです

取引メッセージの自動送信機能と重複して送信されている可能性があります。

Q: ショップへの質問機能をAPIで取得・送信できますか?

ショップへの質問(購入前の質問)はAPIで対応していません。管理画面からの対応をお願いします。

なお、注文後の取引メッセージはAPIで送信・取得が可能です。

Q: 追跡番号や配送業者情報をAPIで設定できますか?

updateShippingTrackingCodeを使用して配送業者名と追跡番号を設定できます。追跡コードには\nで改行を含めることができ、複数の追跡番号を記載することも可能です。ただし、更新時に購入者への通知は送られません。

Q: orderedDateGteパラメータは何を基準にしていますか?

注文のcreatedAt(注文作成日時)を基準にしています。UTCタイムゾーンのため、日本時間との9時間差にご注意ください。

Q: 注文のshipping情報が取得できない場合がありますが、どのタイミングで取得できますか?

WAITING_FOR_SHIPPING以降のステータスで取得可能です。配送方法により内容が異なり、匿名配送(メルカリ便)では住所情報はnullになります。

Q: addTransactionMessageのmessageフィールドの文字数カウント方法を教えてください

1,000文字制限で、改行・絵文字・特殊文字・マルチバイト文字は全て1文字としてカウントされます。UTF-8での文字数計算となります。

Q: APIを利用して、お客様とコミュニケーションを取る方法はありますか?

注文後の取引メッセージのやりとりがAPI経由で可能です。addTransactionMessageでメッセージ送信、order.messagesでメッセージ取得ができます。注文前の質問機能は非対応です。

Q: debugCreateOrderでクレジットカード以外の支払い方法やクーポンをテストできますか?

Sandbox環境ではクレジットカードとポイント支払いのみ対応しています。コンビニ払い等の他の支払い方法とクーポン機能は利用できません。

Q: completeOrderとupdateShippingTrackingCodeはショップ管理画面のどの操作に該当しますか?

completeOrderは注文管理の発送完了ボタン、updateShippingTrackingCodeは注文詳細の追跡番号入力に対応します。

Q: 管理画面の「注文の一括発送通知」のようなAPIはありますか?

APIでは一括発送通知機能はありません。注文ごとに個別にcompleteOrderを実行する必要があります。

Q: debugCreateOrderを実行すると権限エラーが発生します

debugCreateOrderは本番環境では利用できません。Sandbox環境でのみ使用可能です。

Q: APIで注文者名を取得することはできますか?

注文者名は個人情報のため取得できません。Order.customerInfo.nicknameでニックネームを取得可能ですが、一意性は担保されていません。

Q: API開発のテスト用に注文データを作成することはできますか?

debugCreateOrderを使用してテスト用の注文を作成できます。Sandbox環境でのみ利用可能です。

Q: Order型のpaymentMethodは配列型ですが、複数の値が入るのはどのような場合ですか?

複数の支払い方法を併用した場合に複数表記されます。例:ポイントとクレジットカードの併用時は["BALANCE", "CREDIT_CARD"]となります。

Q: 管理画面で「支払が完了されました」と表示されているのに、APIのpaidAtがnullです

CREDIT_CARDが含まれる場合やBALANCEのみの場合、paidAtはnullとなります。この場合の支払い時刻はorder.createdAtを参照してください。

Q: ShippingAddressのstateフィールドにはどのような値が入りますか?

都道府県情報がid(例:"jp01")とname(例:"北海道")の形式で格納されます。

Q: Order APIに「注文数」のフィールドがありませんが、複数購入はどう処理されますか?

メルカリShopsでは1回の注文で1個の商品のみ購入可能です。同じ商品を複数購入する場合は複数の注文となります。

Q: WAITING_FOR_PAYMENTステータスでの発送とキャンセルについて教えてください

支払い完了前は発送できません。WAITING_FOR_SHIPPINGへの遷移はorder queryでの定期確認またはORDER_PAIDのWebhookで検知できます。キャンセル権限はショップのみが持ちます。

Q: APIのtotalPriceから購入者の実際の請求金額を算出する方法を教えてください

購入者の支払い金額は以下の計算式で算出できます:

購入者支払い金額 = totalPrice - orderCoupon.discountAmount
  • totalPrice: 商品本体価格 + 購入者負担送料(buyerShippingFee)
  • salesFee: 販売者が支払う手数料(購入者の支払い金額には影響しません)
  • buyerShippingFee: 購入者負担の場合はtotalPriceに含まれ、ショップ負担の場合は0

商品価格1000円、購入者負担送料500円、クーポン200円引きの場合は下記の値となります:

totalPrice: 1000 + 500 = 1500
購入者支払い金額: 1500 - 200 = 1300
販売手数料: (1000 + 500 - 200) × 10% = 130
販売者売上金: 1300 - 130 = 1170

Q: completeOrderを複数回実行できますか?

1回のみ実行可能です。2回目以降の実行はエラーとなります。

Q: Sandbox環境でメルカリ便の配送ができません

Sandbox環境ではメルカリ便は利用できません。debugCreateOrderは配送方法が「未定(UNDECIDED)」の商品のみ対象にできます。

Q: completeOrderとupdateShippingTrackingCodeを実行すると、OrderのupdatedAtは更新されますか?

completeOrderは直ちにupdatedAtが更新されますが、updateShippingTrackingCodeはupdatedAtを更新しません。

FAQ(Webhook)

Q: webhookの取得や操作でPermission Deniedエラーが発生します

webhook操作には管理者またはオーナー権限のアクセストークンが必要です。担当者権限では操作できません。

Q: Webhookの設定方法を教えてください

WebhookはAPI利用者専用の機能です。管理画面からの設定はできません。createWebhook APIを使用して設定してください。

FAQ(Sandbox)

Q: Sandbox環境の基本仕様と制限事項について教えてください

Sandbox環境は開発・テスト専用環境で、本番環境と完全に分離されています。管理画面はなくAPI専用です。環境ごとに異なるアクセストークンが必要です。

Q: Sandbox環境で管理画面による確認はできますか?

管理画面はありません。APIのGetやListクエリで確認し、注文作成はdebugCreateOrderを使用してください。

Q: Sandbox環境でテストデータを作成・確認する方法を教えてください

API経由でデータを作成・確認します。商品はcreateProduct、注文はdebugCreateOrderを使用します。データ確認はQuery系APIで行ってください。

Q: Sandbox環境で送料設定のテストをすることはできますか?

Sandbox環境では送料設定(ShippingConfiguration)を作成できません。

Q: スキーマファイル(schema.graphql)のダウンロード方法を教えて下さい

https://api.mercari-shops-sandbox.com/v1/graphqlのGraphQL Playgroundから「SCHEMA」タブの「DOWNLOAD」→「SDL」でダウンロードできます。事前に申請したIPアドレスからのみアクセス可能です。

FAQ(Rate limiting)

Q: Rate Limitの基本仕様について教えてください

Rate Limitはショップ単位で管理され、1時間あたり10,000ポイントが上限です。詳細はRate Limitingをご参照ください。

Q: 複数のアクセストークンを使用した場合のRate Limitはどうなりますか?

複数のアクセストークンを使用しても、制限はショップ単位で管理されます。10,000ポイント/時間の制限を全てのトークンで共有して消費します。

Q: Rate Limit超過エラーが発生した場合の対策は?

アクセス頻度を減らし、Webhookの活用や不要フィールドの削除でコストを最適化してください。エラー発生時はX-Ratelimit-Resetヘッダーでリセット時刻を確認し、時間経過後に再実行してください。

Q: クエリコストはどのように計算されますか?

レスポンスヘッダーのX-Ratelimit-Usedで実際に消費したコストを確認できます。Sandbox環境で計算対象のクエリを実行し、レスポンスヘッダーをご確認ください。

FAQ(Others)

Q: サンプルプログラムは提供されていますか?

サンプルプログラムは提供しておりません。本API仕様書のみ提供しています。

Q: 実装時のサンプルコードや各言語のライブラリは提供されていますか?

メルカリから提供しているサンプルコードやライブラリはありません。本API仕様書を参考に実装してください。

Q: 各種IDの桁数について教えてください

各種IDは22文字以下の文字列です(例:EZBnpeJfibJnEs6qXbjMZN)。将来的に桁数が変わる可能性があるため、固定長を前提とした処理は避けてください。

Changelog

2025-09-10

  • FAQセクションを追加

2025-06-04

2025-03-24

2024-10-16

2024-10-02

以前の更新履歴

2024-07-09

  • Rate limiting Rate limitingに関するHeaderの仕様を追加

2024-07-04

2024-04-01

2024-03-25

2023-11-01

2023-09-21

  • products SKU Code による検索が前方一致になる説明を追加
  • products Variant name による検索に関する記述を削除

2023-08-28

  • orders query の引数に、OrderStatusFilter 型の statuses フィールドを追加
  • orders query の引数である completed を deprecated に変更
  • orders query の引数である canceled を deprecated に変更

2023-08-07

2023-07-24

2023-07-05

2023-06-23

2023-05-23

2023-05-22

2023-05-16

2023-04-18

  • ProductVariantproduct フィールドを追加
  • Variant ID に関して商品更新時の注意事項を更新

2023-04-14

2023-03-28

変更履歴がわかる Changelog セクションを追加しました。

これまでの変更履歴は以下の通りです。

Queries

availableProductConditionOptions

Description

Returns a list of Product Condition Option values. You can use these values for Product creation or updates

Response

Returns [ProductConditionOption!]!

Example

Query
query availableProductConditionOptions {
  availableProductConditionOptions {
    name
    type
  }
}
Response
{
  "data": {
    "availableProductConditionOptions": [
      {
        "name": "xyz789",
        "type": "ALMOST_NEW"
      }
    ]
  }
}

availableProductStatusOptions

Description

Returns a list of Product Status Option values. You can use these values for Product creation or updates

Response

Returns [ProductStatusOption!]!

Example

Query
query availableProductStatusOptions {
  availableProductStatusOptions {
    name
    type
  }
}
Response
{
  "data": {
    "availableProductStatusOptions": [
      {"name": "xyz789", "type": "OPENED"}
    ]
  }
}

availableShippingDurationOptions

Description

Returns a list of Shipping Duration Option values. You can use these values for Product creation or updates

Response

Returns [ShippingDurationOption!]!

Example

Query
query availableShippingDurationOptions {
  availableShippingDurationOptions {
    name
    type
  }
}
Response
{
  "data": {
    "availableShippingDurationOptions": [
      {
        "name": "xyz789",
        "type": "EIGHT_DAYS_OR_MORE_OR_UNDECIDED"
      }
    ]
  }
}

availableShippingMethodOptions

Description

Returns a list of Shipping Method Option values. You can use these values for Product creation or updates. The content of the list depends on the kind of business (BusinessKind) of a shop. Usually, 'Person' BusinessKind has fewer options than 'Sole Proprietorship' or 'Corporation'

Response

Returns [ShippingMethodOption!]!

Example

Query
query availableShippingMethodOptions {
  availableShippingMethodOptions {
    name
    type
  }
}
Response
{
  "data": {
    "availableShippingMethodOptions": [
      {"name": "abc123", "type": "COOL"}
    ]
  }
}

availableShippingPayerOptions

Description

Returns a list of Shipping Payer Option values. It represents which person will pay the shipping fee. You can use these values for Product creation or updates. Currently, you can only use SELLER value for the option

Response

Returns [ShippingPayerOption!]!

Example

Query
query availableShippingPayerOptions {
  availableShippingPayerOptions {
    name
    type
  }
}
Response
{
  "data": {
    "availableShippingPayerOptions": [
      {"name": "abc123", "type": "BUYER"}
    ]
  }
}

cancelReasonTypes

Response

Returns [CancelReason!]!

Example

Query
query cancelReasonTypes {
  cancelReasonTypes {
    name
    type
  }
}
Response
{
  "data": {
    "cancelReasonTypes": [
      {
        "name": "abc123",
        "type": "abc123"
      }
    ]
  }
}

errorCodes

Description

Returns a list of error codes. You might receive these error codes when your query/mutation failed

Response

Returns [ErrorCode!]!

Example

Query
query errorCodes {
  errorCodes
}
Response
{"data": {"errorCodes": ["PRODUCT_JAN_CODE_DUPLICATED"]}}

mappedProductCategories

Description

Returns a list of product category

Response

Returns [ProductCategory!]!

Arguments
Name Description
mallProductCategories - [MallProductCategory!] The List of mall product category

Example

Query
query mappedProductCategories($mallProductCategories: [MallProductCategory!]) {
  mappedProductCategories(mallProductCategories: $mallProductCategories) {
    hasChild
    id
    name
    parentId
  }
}
Variables
{"mallProductCategories": [MallProductCategory]}
Response
{
  "data": {
    "mappedProductCategories": [
      {
        "hasChild": true,
        "id": 4,
        "name": "abc123",
        "parentId": "abc123"
      }
    ]
  }
}

order

Description

Returns an Order by ID

Response

Returns an Order!

Arguments
Name Description
id - ID! A globally-unique identifier

Example

Query
query order($id: ID!) {
  order(id: $id) {
    buyerShippingFee
    cancelReasonType
    canceledAt
    cancellable
    completedAt
    createdAt
    customerInfo {
      nickname
      pictureUrl
    }
    id
    messages {
      createdAt
      id
      message
      role
    }
    orderCoupon {
      couponDisplayId
      couponId
      discountAmount
    }
    paidAt
    paymentDeadline
    paymentMethod
    products {
      name
      price
      productAssetId
      productId
      variant {
        id
        janCode
        name
        skuCode
      }
    }
    salesFee
    shipping {
      id
      method
      senderAddress {
        address1
        address2
        city
        country
        firstName
        firstNameEN
        firstNameKana
        lastName
        lastNameEN
        lastNameKana
        phoneNumber
        postalCode
        state {
          ...StateFragment
        }
      }
      shippingAddress {
        address1
        address2
        city
        country
        firstName
        firstNameEN
        firstNameKana
        lastName
        lastNameEN
        lastNameKana
        phoneNumber
        postalCode
        state {
          ...StateFragment
        }
      }
      trackingCode
    }
    status
    totalPrice
    updatedAt
  }
}
Variables
{"id": 4}
Response
{
  "data": {
    "order": {
      "buyerShippingFee": 987,
      "cancelReasonType": "DEFECTIVE_PRODUCT",
      "canceledAt": "2007-12-03T10:15:30Z",
      "cancellable": false,
      "completedAt": "2007-12-03T10:15:30Z",
      "createdAt": "2007-12-03T10:15:30Z",
      "customerInfo": UserInfo,
      "id": "4",
      "messages": [TransactionMessage],
      "orderCoupon": OrderCoupon,
      "paidAt": "2007-12-03T10:15:30Z",
      "paymentDeadline": "2007-12-03T10:15:30Z",
      "paymentMethod": ["BALANCE"],
      "products": [OrderProduct],
      "salesFee": 987,
      "shipping": Shipping,
      "status": "CANCELED",
      "totalPrice": 987,
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}

orders

Description

Returns a list of orders

Response

Returns an OrderConnection!

Arguments
Name Description
after - String This value is supposed to be endCursor value of PageInfo Type. You can retrieve a list that is contained after the cursor
canceled - Boolean [Deprecated] If specified, the only orders that has been canceled will be displayed. Only one of statuses or completed(canceled) should be specified. Use statuses ([CANCELED]) instead
completed - Boolean [Deprecated] If specified, the only orders that has been completed will be displayed. Only one of statuses or completed(canceled) should be specified. Use statuses ([COMPLETED]) instead
first - Int Number of the nodes that you want to get from a list. Default = 100
keyword - String If specified, the only orders that has the keyword in product name or variant name or sku code
orderedDateGte - DateTime If specified, the only orders that has the DateTime grater than equal this value will be displayed
orderedDateLt - DateTime If specified, the only orders that has the DateTime less than this value will be displayed
statuses - [OrderStatusFilter!] If specified, the only orders that have specified statuses. Only one of statuses or completed(canceled) should be specified
updatedDateGte - DateTime If specified, the only orders that updated DateTime grater than equal this value will be displayed
updatedDateLt - DateTime If specified, the only orders that updated DateTime less than this value will be displayed

Example

Query
query orders(
  $after: String,
  $canceled: Boolean,
  $completed: Boolean,
  $first: Int,
  $keyword: String,
  $orderedDateGte: DateTime,
  $orderedDateLt: DateTime,
  $statuses: [OrderStatusFilter!],
  $updatedDateGte: DateTime,
  $updatedDateLt: DateTime
) {
  orders(
    after: $after,
    canceled: $canceled,
    completed: $completed,
    first: $first,
    keyword: $keyword,
    orderedDateGte: $orderedDateGte,
    orderedDateLt: $orderedDateLt,
    statuses: $statuses,
    updatedDateGte: $updatedDateGte,
    updatedDateLt: $updatedDateLt
  ) {
    edges {
      node {
        buyerShippingFee
        cancelReasonType
        canceledAt
        cancellable
        completedAt
        createdAt
        customerInfo {
          ...UserInfoFragment
        }
        id
        messages {
          ...TransactionMessageFragment
        }
        orderCoupon {
          ...OrderCouponFragment
        }
        paidAt
        paymentDeadline
        paymentMethod
        products {
          ...OrderProductFragment
        }
        salesFee
        shipping {
          ...ShippingFragment
        }
        status
        totalPrice
        updatedAt
      }
    }
    pageInfo {
      endCursor
      hasNextPage
    }
  }
}
Variables
{
  "after": "abc123",
  "canceled": false,
  "completed": false,
  "first": 100,
  "keyword": "abc123",
  "orderedDateGte": "2007-12-03T10:15:30Z",
  "orderedDateLt": "2007-12-03T10:15:30Z",
  "statuses": ["CANCELED"],
  "updatedDateGte": "2007-12-03T10:15:30Z",
  "updatedDateLt": "2007-12-03T10:15:30Z"
}
Response
{
  "data": {
    "orders": {
      "edges": [OrderEdge],
      "pageInfo": PageInfo
    }
  }
}

product

Description

Returns a Product by ID

Response

Returns a Product!

Arguments
Name Description
id - String! A globally-unique identifier

Example

Query
query product($id: String!) {
  product(id: $id) {
    assets {
      contentSize
      contentType
      id
      imageURL
    }
    brand {
      id
      name
      nameEn
      nameKana
    }
    categories {
      hasChild
      id
      name
      parentId
    }
    condition
    createdAt
    description
    id
    imageUrls
    name
    price
    shippingConfiguration {
      createdAt
      details {
        destination
        fee
      }
      displayId
      id
      title
      type
      updatedAt
    }
    shippingDuration
    shippingFromState {
      id
      name
    }
    shippingMethod
    shippingPayer
    status
    updatedAt
    variants {
      id
      janCode
      name
      product {
        assets {
          ...AssetFragment
        }
        brand {
          ...ProductBrandFragment
        }
        categories {
          ...ProductCategoryFragment
        }
        condition
        createdAt
        description
        id
        imageUrls
        name
        price
        shippingConfiguration {
          ...ShippingConfigurationFragment
        }
        shippingDuration
        shippingFromState {
          ...StateFragment
        }
        shippingMethod
        shippingPayer
        status
        updatedAt
        variants {
          ...ProductVariantFragment
        }
      }
      skuCode
      stockQuantity
    }
  }
}
Variables
{"id": "abc123"}
Response
{
  "data": {
    "product": {
      "assets": [Asset],
      "brand": ProductBrand,
      "categories": [ProductCategory],
      "condition": "ALMOST_NEW",
      "createdAt": "2007-12-03T10:15:30Z",
      "description": "xyz789",
      "id": "4",
      "imageUrls": ["xyz789"],
      "name": "abc123",
      "price": 987,
      "shippingConfiguration": ShippingConfiguration,
      "shippingDuration": "EIGHT_DAYS_OR_MORE_OR_UNDECIDED",
      "shippingFromState": State,
      "shippingMethod": "COOL",
      "shippingPayer": "BUYER",
      "status": "OPENED",
      "updatedAt": "2007-12-03T10:15:30Z",
      "variants": [ProductVariant]
    }
  }
}

productBrands

Description

Returns a list of Product Brands. You can use these values for Product creation or updates

Response

Returns [ProductBrand!]!

Example

Query
query productBrands {
  productBrands {
    id
    name
    nameEn
    nameKana
  }
}
Response
{
  "data": {
    "productBrands": [
      {
        "id": 4,
        "name": "xyz789",
        "nameEn": "abc123",
        "nameKana": "xyz789"
      }
    ]
  }
}

productCategories

Description

Returns a list of Product Categories. You can use these values for Product creation or updates

Response

Returns [ProductCategory!]!

Example

Query
query productCategories {
  productCategories {
    hasChild
    id
    name
    parentId
  }
}
Response
{
  "data": {
    "productCategories": [
      {
        "hasChild": true,
        "id": 4,
        "name": "abc123",
        "parentId": "xyz789"
      }
    ]
  }
}

productShippingConfiguration

Description

Returns a ShippingConfiguration by ID

Response

Returns a ShippingConfiguration!

Arguments
Name Description
id - String! A globally-unique identifier

Example

Query
query productShippingConfiguration($id: String!) {
  productShippingConfiguration(id: $id) {
    createdAt
    details {
      destination
      fee
    }
    displayId
    id
    title
    type
    updatedAt
  }
}
Variables
{"id": "abc123"}
Response
{
  "data": {
    "productShippingConfiguration": {
      "createdAt": "2007-12-03T10:15:30Z",
      "details": [ShippingConfigurationDetail],
      "displayId": "xyz789",
      "id": 4,
      "title": "xyz789",
      "type": "NATIONWIDE_EQUAL",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}

productShippingConfigurations

Description

Returns a list of your Shop's ShippingConfigurations

Arguments
Name Description
after - String This value is supposed to be endCursor value of PageInfo Type. You can retrieve a list that is contained after the cursor
first - Int Number of the nodes that you want to get from a list. Default = 20

Example

Query
query productShippingConfigurations(
  $after: String,
  $first: Int
) {
  productShippingConfigurations(
    after: $after,
    first: $first
  ) {
    edges {
      node {
        createdAt
        details {
          ...ShippingConfigurationDetailFragment
        }
        displayId
        id
        title
        type
        updatedAt
      }
    }
    pageInfo {
      endCursor
      hasNextPage
    }
  }
}
Variables
{"after": "abc123", "first": 20}
Response
{
  "data": {
    "productShippingConfigurations": {
      "edges": [ShippingConfigurationEdge],
      "pageInfo": PageInfo
    }
  }
}

productVariant

Description

Returns a Variant by ID or SKU code

Response

Returns a ProductVariant!

Arguments
Name Description
by - ProductVariantBy!

Example

Query
query productVariant($by: ProductVariantBy!) {
  productVariant(by: $by) {
    id
    janCode
    name
    product {
      assets {
        contentSize
        contentType
        id
        imageURL
      }
      brand {
        id
        name
        nameEn
        nameKana
      }
      categories {
        hasChild
        id
        name
        parentId
      }
      condition
      createdAt
      description
      id
      imageUrls
      name
      price
      shippingConfiguration {
        createdAt
        details {
          ...ShippingConfigurationDetailFragment
        }
        displayId
        id
        title
        type
        updatedAt
      }
      shippingDuration
      shippingFromState {
        id
        name
      }
      shippingMethod
      shippingPayer
      status
      updatedAt
      variants {
        id
        janCode
        name
        product {
          ...ProductFragment
        }
        skuCode
        stockQuantity
      }
    }
    skuCode
    stockQuantity
  }
}
Variables
{"by": ProductVariantBy}
Response
{
  "data": {
    "productVariant": {
      "id": "4",
      "janCode": "abc123",
      "name": "abc123",
      "product": Product,
      "skuCode": "xyz789",
      "stockQuantity": 987
    }
  }
}

products

Description

Returns a list of your Shop's Products

Response

Returns a ProductConnection!

Arguments
Name Description
after - String This value is supposed to be endCursor value of PageInfo Type. You can retrieve a list that is contained after the cursor
first - Int Number of the nodes that you want to get from a list. Default = 100
keyword - String A filtering keyword to retrieve product list that is contained specified product name or sku code. Product name is searched by partial match, but sku code is searched by forward match. If you want to get a product by an exact match sku code, use productVariant query which is faster than products query

Example

Query
query products(
  $after: String,
  $first: Int,
  $keyword: String
) {
  products(
    after: $after,
    first: $first,
    keyword: $keyword
  ) {
    edges {
      node {
        assets {
          ...AssetFragment
        }
        brand {
          ...ProductBrandFragment
        }
        categories {
          ...ProductCategoryFragment
        }
        condition
        createdAt
        description
        id
        imageUrls
        name
        price
        shippingConfiguration {
          ...ShippingConfigurationFragment
        }
        shippingDuration
        shippingFromState {
          ...StateFragment
        }
        shippingMethod
        shippingPayer
        status
        updatedAt
        variants {
          ...ProductVariantFragment
        }
      }
    }
    pageInfo {
      endCursor
      hasNextPage
    }
  }
}
Variables
{
  "after": "xyz789",
  "first": 100,
  "keyword": "xyz789"
}
Response
{
  "data": {
    "products": {
      "edges": [ProductEdge],
      "pageInfo": PageInfo
    }
  }
}

shop

Description

Returns a Shop that you own

Response

Returns a Shop!

Example

Query
query shop {
  shop {
    businessKind
    createdAt
    description
    id
    name
  }
}
Response
{
  "data": {
    "shop": {
      "businessKind": "CORPORATE",
      "createdAt": "2007-12-03T10:15:30Z",
      "description": "xyz789",
      "id": "4",
      "name": "xyz789"
    }
  }
}

states

Description

Returns a list of State information that includes id and State name

Response

Returns [State!]!

Example

Query
query states {
  states {
    id
    name
  }
}
Response
{
  "data": {
    "states": [{"id": 4, "name": "xyz789"}]
  }
}

webhook

Description

Returns a Webhook by ID

Response

Returns a Webhook!

Arguments
Name Description
id - ID! A globally-unique identifier

Example

Query
query webhook($id: ID!) {
  webhook(id: $id) {
    apiVersion
    createdAt
    endPoint
    id
    topic
  }
}
Variables
{"id": 4}
Response
{
  "data": {
    "webhook": {
      "apiVersion": "abc123",
      "createdAt": "2007-12-03T10:15:30Z",
      "endPoint": "abc123",
      "id": 4,
      "topic": "ORDER_CANCELED"
    }
  }
}

webhooks

Description

Returns a list of Webhooks that is specified for your Shop

Response

Returns [Webhook!]!

Example

Query
query webhooks {
  webhooks {
    apiVersion
    createdAt
    endPoint
    id
    topic
  }
}
Response
{
  "data": {
    "webhooks": [
      {
        "apiVersion": "abc123",
        "createdAt": "2007-12-03T10:15:30Z",
        "endPoint": "xyz789",
        "id": "4",
        "topic": "ORDER_CANCELED"
      }
    ]
  }
}

Mutations

addProductVariants

Description

Adds a Variant to a Product

Response

Returns an AddProductVariantsPayload!

Arguments
Name Description
input - AddProductVariantsInput!

Example

Query
mutation addProductVariants($input: AddProductVariantsInput!) {
  addProductVariants(input: $input) {
    product {
      assets {
        contentSize
        contentType
        id
        imageURL
      }
      brand {
        id
        name
        nameEn
        nameKana
      }
      categories {
        hasChild
        id
        name
        parentId
      }
      condition
      createdAt
      description
      id
      imageUrls
      name
      price
      shippingConfiguration {
        createdAt
        details {
          ...ShippingConfigurationDetailFragment
        }
        displayId
        id
        title
        type
        updatedAt
      }
      shippingDuration
      shippingFromState {
        id
        name
      }
      shippingMethod
      shippingPayer
      status
      updatedAt
      variants {
        id
        janCode
        name
        product {
          ...ProductFragment
        }
        skuCode
        stockQuantity
      }
    }
  }
}
Variables
{"input": AddProductVariantsInput}
Response
{"data": {"addProductVariants": {"product": Product}}}

addTransactionMessage

Description

Adds a Transaction Message to an Order

Response

Returns an AddTransactionMessagePayload!

Arguments
Name Description
input - AddTransactionMessageInput!

Example

Query
mutation addTransactionMessage($input: AddTransactionMessageInput!) {
  addTransactionMessage(input: $input) {
    order {
      buyerShippingFee
      cancelReasonType
      canceledAt
      cancellable
      completedAt
      createdAt
      customerInfo {
        nickname
        pictureUrl
      }
      id
      messages {
        createdAt
        id
        message
        role
      }
      orderCoupon {
        couponDisplayId
        couponId
        discountAmount
      }
      paidAt
      paymentDeadline
      paymentMethod
      products {
        name
        price
        productAssetId
        productId
        variant {
          ...OrderVariantFragment
        }
      }
      salesFee
      shipping {
        id
        method
        senderAddress {
          ...ShippingAddressFragment
        }
        shippingAddress {
          ...ShippingAddressFragment
        }
        trackingCode
      }
      status
      totalPrice
      updatedAt
    }
  }
}
Variables
{"input": AddTransactionMessageInput}
Response
{"data": {"addTransactionMessage": {"order": Order}}}

cancelOrder

Description

Cancels an Order. You can not cancel completed Orders. Furthermore, you also can't do that if more than 365 days has passed since the order was created. Order cancellation is processed asynchronously. Usually, if your request is accepted correctly, the process will be done successfully in a short time. But in very rare cases, the process may take a long time. So please use order/orders query to check the exact order status if you need it

Response

Returns a CancelOrderPayload!

Arguments
Name Description
input - CancelOrderInput!

Example

Query
mutation cancelOrder($input: CancelOrderInput!) {
  cancelOrder(input: $input) {
    order {
      buyerShippingFee
      cancelReasonType
      canceledAt
      cancellable
      completedAt
      createdAt
      customerInfo {
        nickname
        pictureUrl
      }
      id
      messages {
        createdAt
        id
        message
        role
      }
      orderCoupon {
        couponDisplayId
        couponId
        discountAmount
      }
      paidAt
      paymentDeadline
      paymentMethod
      products {
        name
        price
        productAssetId
        productId
        variant {
          ...OrderVariantFragment
        }
      }
      salesFee
      shipping {
        id
        method
        senderAddress {
          ...ShippingAddressFragment
        }
        shippingAddress {
          ...ShippingAddressFragment
        }
        trackingCode
      }
      status
      totalPrice
      updatedAt
    }
  }
}
Variables
{"input": CancelOrderInput}
Response
{"data": {"cancelOrder": {"order": Order}}}

completeOrder

Description

Completes an Order. It notifies the buyer that the purchased product has been shipped. Sales are credited to your Shop at the same time. The order completion will be processed asynchronously. Usually, if your request is accepted correctly, the process will be done successfully in a short time. But in very rare cases, the process may take a long time. So please use order/orders query to check the exact order status if you need it

Response

Returns a CompleteOrderPayload!

Arguments
Name Description
input - CompleteOrderInput!

Example

Query
mutation completeOrder($input: CompleteOrderInput!) {
  completeOrder(input: $input) {
    order {
      buyerShippingFee
      cancelReasonType
      canceledAt
      cancellable
      completedAt
      createdAt
      customerInfo {
        nickname
        pictureUrl
      }
      id
      messages {
        createdAt
        id
        message
        role
      }
      orderCoupon {
        couponDisplayId
        couponId
        discountAmount
      }
      paidAt
      paymentDeadline
      paymentMethod
      products {
        name
        price
        productAssetId
        productId
        variant {
          ...OrderVariantFragment
        }
      }
      salesFee
      shipping {
        id
        method
        senderAddress {
          ...ShippingAddressFragment
        }
        shippingAddress {
          ...ShippingAddressFragment
        }
        trackingCode
      }
      status
      totalPrice
      updatedAt
    }
  }
}
Variables
{"input": CompleteOrderInput}
Response
{"data": {"completeOrder": {"order": Order}}}

createProduct

Description

Creates a Product

Response

Returns a CreateProductPayload!

Arguments
Name Description
input - CreateProductInput!

Example

Query
mutation createProduct($input: CreateProductInput!) {
  createProduct(input: $input) {
    product {
      assets {
        contentSize
        contentType
        id
        imageURL
      }
      brand {
        id
        name
        nameEn
        nameKana
      }
      categories {
        hasChild
        id
        name
        parentId
      }
      condition
      createdAt
      description
      id
      imageUrls
      name
      price
      shippingConfiguration {
        createdAt
        details {
          ...ShippingConfigurationDetailFragment
        }
        displayId
        id
        title
        type
        updatedAt
      }
      shippingDuration
      shippingFromState {
        id
        name
      }
      shippingMethod
      shippingPayer
      status
      updatedAt
      variants {
        id
        janCode
        name
        product {
          ...ProductFragment
        }
        skuCode
        stockQuantity
      }
    }
  }
}
Variables
{"input": CreateProductInput}
Response
{"data": {"createProduct": {"product": Product}}}

createWebhook

Description

Creates a Webhook for your Shop

Response

Returns a CreateWebhookPayload!

Arguments
Name Description
input - CreateWebhookInput!

Example

Query
mutation createWebhook($input: CreateWebhookInput!) {
  createWebhook(input: $input) {
    webhook {
      apiVersion
      createdAt
      endPoint
      id
      topic
    }
  }
}
Variables
{"input": CreateWebhookInput}
Response
{"data": {"createWebhook": {"webhook": Webhook}}}

debugCreateOrder

Description

Create debug order. It is a mutation for debug and test, that can only be used in a sandbox environment. In rare cases, orders may be created even if TimeoutError occurs

Response

Returns a DebugCreateOrderPayload!

Arguments
Name Description
input - DebugCreateOrderInput!

Example

Query
mutation debugCreateOrder($input: DebugCreateOrderInput!) {
  debugCreateOrder(input: $input) {
    order {
      buyerShippingFee
      cancelReasonType
      canceledAt
      cancellable
      completedAt
      createdAt
      customerInfo {
        nickname
        pictureUrl
      }
      id
      messages {
        createdAt
        id
        message
        role
      }
      orderCoupon {
        couponDisplayId
        couponId
        discountAmount
      }
      paidAt
      paymentDeadline
      paymentMethod
      products {
        name
        price
        productAssetId
        productId
        variant {
          ...OrderVariantFragment
        }
      }
      salesFee
      shipping {
        id
        method
        senderAddress {
          ...ShippingAddressFragment
        }
        shippingAddress {
          ...ShippingAddressFragment
        }
        trackingCode
      }
      status
      totalPrice
      updatedAt
    }
  }
}
Variables
{"input": DebugCreateOrderInput}
Response
{"data": {"debugCreateOrder": {"order": Order}}}

decreaseProductVariantStock

Description

Decreases the quantity of Stock

Arguments
Name Description
by - ProductVariantBy!
input - DecreaseProductVariantStockInput!

Example

Query
mutation decreaseProductVariantStock(
  $by: ProductVariantBy!,
  $input: DecreaseProductVariantStockInput!
) {
  decreaseProductVariantStock(
    by: $by,
    input: $input
  ) {
    productVariant {
      id
      janCode
      name
      product {
        assets {
          ...AssetFragment
        }
        brand {
          ...ProductBrandFragment
        }
        categories {
          ...ProductCategoryFragment
        }
        condition
        createdAt
        description
        id
        imageUrls
        name
        price
        shippingConfiguration {
          ...ShippingConfigurationFragment
        }
        shippingDuration
        shippingFromState {
          ...StateFragment
        }
        shippingMethod
        shippingPayer
        status
        updatedAt
        variants {
          ...ProductVariantFragment
        }
      }
      skuCode
      stockQuantity
    }
  }
}
Variables
{
  "by": ProductVariantBy,
  "input": DecreaseProductVariantStockInput
}
Response
{
  "data": {
    "decreaseProductVariantStock": {
      "productVariant": ProductVariant
    }
  }
}

deleteProduct

Description

Deletes a Product

Response

Returns a DeleteProductPayload!

Arguments
Name Description
input - DeleteProductInput!

Example

Query
mutation deleteProduct($input: DeleteProductInput!) {
  deleteProduct(input: $input) {
    id
  }
}
Variables
{"input": DeleteProductInput}
Response
{"data": {"deleteProduct": {"id": 4}}}

deleteProductVariant

Description

Deletes a Variant

Response

Returns a DeleteProductVariantPayload!

Arguments
Name Description
input - DeleteProductVariantInput!

Example

Query
mutation deleteProductVariant($input: DeleteProductVariantInput!) {
  deleteProductVariant(input: $input) {
    id
  }
}
Variables
{"input": DeleteProductVariantInput}
Response
{
  "data": {
    "deleteProductVariant": {"id": "4"}
  }
}

deleteWebhook

Description

Deletes the Webhook by ID

Response

Returns a DeleteWebhookPayload!

Arguments
Name Description
input - DeleteWebhookInput!

Example

Query
mutation deleteWebhook($input: DeleteWebhookInput!) {
  deleteWebhook(input: $input) {
    id
  }
}
Variables
{"input": DeleteWebhookInput}
Response
{"data": {"deleteWebhook": {"id": 4}}}

increaseProductVariantStock

Description

Increases the quantity of Stock

Arguments
Name Description
by - ProductVariantBy!
input - IncreaseProductVariantStockInput!

Example

Query
mutation increaseProductVariantStock(
  $by: ProductVariantBy!,
  $input: IncreaseProductVariantStockInput!
) {
  increaseProductVariantStock(
    by: $by,
    input: $input
  ) {
    productVariant {
      id
      janCode
      name
      product {
        assets {
          ...AssetFragment
        }
        brand {
          ...ProductBrandFragment
        }
        categories {
          ...ProductCategoryFragment
        }
        condition
        createdAt
        description
        id
        imageUrls
        name
        price
        shippingConfiguration {
          ...ShippingConfigurationFragment
        }
        shippingDuration
        shippingFromState {
          ...StateFragment
        }
        shippingMethod
        shippingPayer
        status
        updatedAt
        variants {
          ...ProductVariantFragment
        }
      }
      skuCode
      stockQuantity
    }
  }
}
Variables
{
  "by": ProductVariantBy,
  "input": IncreaseProductVariantStockInput
}
Response
{
  "data": {
    "increaseProductVariantStock": {
      "productVariant": ProductVariant
    }
  }
}

updateProduct

Description

Updates a Product

Response

Returns an UpdateProductPayload!

Arguments
Name Description
input - UpdateProductInput!

Example

Query
mutation updateProduct($input: UpdateProductInput!) {
  updateProduct(input: $input) {
    product {
      assets {
        contentSize
        contentType
        id
        imageURL
      }
      brand {
        id
        name
        nameEn
        nameKana
      }
      categories {
        hasChild
        id
        name
        parentId
      }
      condition
      createdAt
      description
      id
      imageUrls
      name
      price
      shippingConfiguration {
        createdAt
        details {
          ...ShippingConfigurationDetailFragment
        }
        displayId
        id
        title
        type
        updatedAt
      }
      shippingDuration
      shippingFromState {
        id
        name
      }
      shippingMethod
      shippingPayer
      status
      updatedAt
      variants {
        id
        janCode
        name
        product {
          ...ProductFragment
        }
        skuCode
        stockQuantity
      }
    }
  }
}
Variables
{"input": UpdateProductInput}
Response
{"data": {"updateProduct": {"product": Product}}}

updateProductVariant

Description

Updates a Variant

Response

Returns an UpdateProductVariantPayload!

Arguments
Name Description
by - ProductVariantBy!
input - UpdateProductVariantInput!

Example

Query
mutation updateProductVariant(
  $by: ProductVariantBy!,
  $input: UpdateProductVariantInput!
) {
  updateProductVariant(
    by: $by,
    input: $input
  ) {
    productVariant {
      id
      janCode
      name
      product {
        assets {
          ...AssetFragment
        }
        brand {
          ...ProductBrandFragment
        }
        categories {
          ...ProductCategoryFragment
        }
        condition
        createdAt
        description
        id
        imageUrls
        name
        price
        shippingConfiguration {
          ...ShippingConfigurationFragment
        }
        shippingDuration
        shippingFromState {
          ...StateFragment
        }
        shippingMethod
        shippingPayer
        status
        updatedAt
        variants {
          ...ProductVariantFragment
        }
      }
      skuCode
      stockQuantity
    }
  }
}
Variables
{
  "by": ProductVariantBy,
  "input": UpdateProductVariantInput
}
Response
{
  "data": {
    "updateProductVariant": {
      "productVariant": ProductVariant
    }
  }
}

updateProductVariantSKU

Description

Updates the SKU code of the Variant

Response

Returns an UpdateProductVariantSKUPayload!

Arguments
Name Description
input - UpdateProductVariantSKUInput!

Example

Query
mutation updateProductVariantSKU($input: UpdateProductVariantSKUInput!) {
  updateProductVariantSKU(input: $input) {
    productVariant {
      id
      janCode
      name
      product {
        assets {
          ...AssetFragment
        }
        brand {
          ...ProductBrandFragment
        }
        categories {
          ...ProductCategoryFragment
        }
        condition
        createdAt
        description
        id
        imageUrls
        name
        price
        shippingConfiguration {
          ...ShippingConfigurationFragment
        }
        shippingDuration
        shippingFromState {
          ...StateFragment
        }
        shippingMethod
        shippingPayer
        status
        updatedAt
        variants {
          ...ProductVariantFragment
        }
      }
      skuCode
      stockQuantity
    }
  }
}
Variables
{"input": UpdateProductVariantSKUInput}
Response
{
  "data": {
    "updateProductVariantSKU": {
      "productVariant": ProductVariant
    }
  }
}

updateProductVariants

Description

Updates multiple Variants

Response

Returns an UpdateProductVariantsPayload!

Arguments
Name Description
inputs - [UpdateProductVariantsInput!]! The maximum size of the list is 20

Example

Query
mutation updateProductVariants($inputs: [UpdateProductVariantsInput!]!) {
  updateProductVariants(inputs: $inputs) {
    productVariants {
      id
      janCode
      name
      product {
        assets {
          ...AssetFragment
        }
        brand {
          ...ProductBrandFragment
        }
        categories {
          ...ProductCategoryFragment
        }
        condition
        createdAt
        description
        id
        imageUrls
        name
        price
        shippingConfiguration {
          ...ShippingConfigurationFragment
        }
        shippingDuration
        shippingFromState {
          ...StateFragment
        }
        shippingMethod
        shippingPayer
        status
        updatedAt
        variants {
          ...ProductVariantFragment
        }
      }
      skuCode
      stockQuantity
    }
  }
}
Variables
{"inputs": [UpdateProductVariantsInput]}
Response
{
  "data": {
    "updateProductVariants": {
      "productVariants": [ProductVariant]
    }
  }
}

updateProducts

Description

Updates multiple Products. The updateProducts does not support imageUrls, so will ignore if specified in inputs

Response

Returns an UpdateProductsPayload!

Arguments
Name Description
inputs - [UpdateProductInput!]! The maximum size of the list is 20

Example

Query
mutation updateProducts($inputs: [UpdateProductInput!]!) {
  updateProducts(inputs: $inputs) {
    products {
      assets {
        contentSize
        contentType
        id
        imageURL
      }
      brand {
        id
        name
        nameEn
        nameKana
      }
      categories {
        hasChild
        id
        name
        parentId
      }
      condition
      createdAt
      description
      id
      imageUrls
      name
      price
      shippingConfiguration {
        createdAt
        details {
          ...ShippingConfigurationDetailFragment
        }
        displayId
        id
        title
        type
        updatedAt
      }
      shippingDuration
      shippingFromState {
        id
        name
      }
      shippingMethod
      shippingPayer
      status
      updatedAt
      variants {
        id
        janCode
        name
        product {
          ...ProductFragment
        }
        skuCode
        stockQuantity
      }
    }
  }
}
Variables
{"inputs": [UpdateProductInput]}
Response
{"data": {"updateProducts": {"products": [Product]}}}

updateShippingTrackingCode

Description

Updates the shipping tracking code to the order. This code is optional. But please set the shipping tracking code to make buyers find their package easily

Arguments
Name Description
input - UpdateShippingTrackingCodeInput!

Example

Query
mutation updateShippingTrackingCode($input: UpdateShippingTrackingCodeInput!) {
  updateShippingTrackingCode(input: $input) {
    order {
      buyerShippingFee
      cancelReasonType
      canceledAt
      cancellable
      completedAt
      createdAt
      customerInfo {
        nickname
        pictureUrl
      }
      id
      messages {
        createdAt
        id
        message
        role
      }
      orderCoupon {
        couponDisplayId
        couponId
        discountAmount
      }
      paidAt
      paymentDeadline
      paymentMethod
      products {
        name
        price
        productAssetId
        productId
        variant {
          ...OrderVariantFragment
        }
      }
      salesFee
      shipping {
        id
        method
        senderAddress {
          ...ShippingAddressFragment
        }
        shippingAddress {
          ...ShippingAddressFragment
        }
        trackingCode
      }
      status
      totalPrice
      updatedAt
    }
  }
}
Variables
{"input": UpdateShippingTrackingCodeInput}
Response
{"data": {"updateShippingTrackingCode": {"order": Order}}}

Types

AddProductVariantsInput

Fields
Input Field Description
productId - String! The product id to add variants
variants - [ProductVariantInput!]! The List of variants to add
Example
{
  "productId": "xyz789",
  "variants": [ProductVariantInput]
}

AddProductVariantsPayload

Fields
Field Name Description
product - Product! Updated Product
Example
{"product": Product}

AddTransactionMessageInput

Fields
Input Field Description
message - String! The message to add. The maximum length of the field is 1000 characters
orderId - ID! The order id to add a message
Example
{
  "message": "xyz789",
  "orderId": "4"
}

AddTransactionMessagePayload

Fields
Field Name Description
order - Order! The added transaction message
Example
{"order": Order}

Asset

Description

Asset has information such as images stored in mercari shops

Fields
Field Name Description
contentSize - Int! The content-size of the asset
contentType - String! The content-type of the asset
id - ID! A globally-unique identifier
imageURL - String! The URL to access content body
Arguments
options - AssetImageOptions
Example
{
  "contentSize": 123,
  "contentType": "abc123",
  "id": "4",
  "imageURL": "abc123"
}

AssetImageOptions

Fields
Input Field Description
format - ImageForamt The image format. jpg/png/webp
presets - [ImagePreset!] The size preset of the image. Default = [Default]
Example
{"format": "GIF", "presets": ["Default"]}

Boolean

Description

The Boolean scalar type represents true or false

Example
true

BusinessKind

Description

The possible business kind for a shop

Values
Enum Value Description

CORPORATE

Corporate. (法人)

PERSON

Person. (個人)

SOLO_PROPRIETORSHIP

Solo proprietorship. (個人事業主)

UNSPECIFIED

This value is never used
Example
"CORPORATE"

CancelOrderInput

Fields
Input Field Description
cancelReasonType - CancelReasonType! The reason for canceling the order
id - ID! The order id to update status
Example
{
  "cancelReasonType": "DEFECTIVE_PRODUCT",
  "id": "4"
}

CancelOrderPayload

Fields
Field Name Description
order - Order! The order cancelled
Example
{"order": Order}

CancelReason

Description

The reason why the order was canceled

Fields
Field Name Description
name - String! value of corresponds to enum
type - String! enum of cancel reason
Example
{
  "name": "abc123",
  "type": "abc123"
}

CancelReasonType

Description

the cancel reason of the order

Values
Enum Value Description

DEFECTIVE_PRODUCT

The product is defected of the order. (商品に不備が見つかった)

NO_PAYMENT

Could not confirm the payment of the order. (支払いが確認できない)

NO_PRODUCT_STOCK

No left product stock of the order. (商品の在庫がない)

OTHERS_BY_SELLER

other reasons caused by shop. (その他(ショップ都合))

REQUEST_FROM_BUYER

Buyer requested to cancel the order. (購入者からのキャンセル依頼)

TROUBLE_BY_DELIVERY_COMPANY

Troubled by Delivery company. (配送業者によるトラブル(未着や破損))

UNSPECIFIED

This value is never used

WRONG_DELIVERY_ADDRESS

The delivery address is incorrect. (配送先住所が間違っていた)
Example
"DEFECTIVE_PRODUCT"

CompleteOrderInput

Fields
Input Field Description
id - ID! The order id to update status
Example
{"id": 4}

CompleteOrderPayload

Fields
Field Name Description
order - Order! The order completed
Example
{"order": Order}

CreateProductInput

Fields
Input Field Description
brandId - String The brand id of the product. Use productBrands query to find a brandId. It shows a list of Product Brand information that includes brandId
categoryId - String! The category id of the product. Use productCategories query to find a categoryId. It shows a list of Product Category information that includes categoryId. Only categories with no descendants can be specified
condition - ProductCondition! The condition of the product
description - String The description of the product. The maximum length of the field is 3000 characters
imageUrls - [String!]! The list of asset URLs. You can use only 'https' schema for the URLs. The maximum size of the list is 20
name - String! The name of the product. The maximum length of the field is 130 characters
price - Int! The price of the product. It must be between 300 and 9999999
shippingConfigurationId - String The shipping configuration id of the product. This parameter is required when the shippingPayer is Buyer. To unset the current shippingConfigurationId, specify an empty string when updating the product. When the shippingConfigurationId is null in the update request, the current setting is kept
shippingDuration - ShippingDuration! The shipping duration
shippingFromStateId - String! The area to be shipped from. Use states query to find a stateId. It shows a list of State information that includes StateId
shippingMethod - ShippingMethod! The shipping method
shippingPayer - ShippingPayer! Who pays for shipping, the sender or the recipient
status - ProductStatus! The status of the product visibility
variants - [ProductVariantInput!]! The Variants of the Product
Example
{
  "brandId": "aETNgbtnkJzdVDxn7vBZTJ",
  "categoryId": "AJysQvoxEefUHAAW4xEPnL",
  "condition": "ALMOST_NEW",
  "description": "xyz789",
  "imageUrls": ["https://example.com/path/to/image.png"],
  "name": "abc123",
  "price": 123,
  "shippingConfigurationId": "",
  "shippingDuration": "EIGHT_DAYS_OR_MORE_OR_UNDECIDED",
  "shippingFromStateId": "jp01",
  "shippingMethod": "COOL",
  "shippingPayer": "SELLER",
  "status": "OPENED",
  "variants": [ProductVariantInput]
}

CreateProductPayload

Fields
Field Name Description
product - Product! The product created
Example
{"product": Product}

CreateWebhookInput

Fields
Input Field Description
endPoint - String! The endPoint to handle the webhook topic
topic - WebhookTopic! The topic you want to receive the event in the endpoint
Example
{"endPoint": "https://example.com/", "topic": "ORDER_CANCELED"}

CreateWebhookPayload

Fields
Field Name Description
webhook - Webhook! The webhook created
Example
{"webhook": Webhook}

CreditCardPayMethodType

Description

The possible payment methods

Values
Enum Value Description

INSTALLMENTS

Installments (分割払い)

ONETIME

One Time (一括払い)

UNRECOGNIZED

This value is not used

UNSPECIFIED

This value is not used
Example
"INSTALLMENTS"

DateTime

Description

A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format

Example
"2007-12-03T10:15:30Z"

DebugCreateOrderInput

Fields
Input Field Description
balancePaymentMethod - PaymentMethodBalanceInput
creditCardPaymentMethod - PaymentMethodCreditCardInput Payment method of credit card. Debug API does not require this parameter to be entered
productId - String! Ordered product id of the order
variantId - String! Ordered variant id of the order
Example
{
  "balancePaymentMethod": PaymentMethodBalanceInput,
  "creditCardPaymentMethod": PaymentMethodCreditCardInput,
  "productId": "abc123",
  "variantId": "abc123"
}

DebugCreateOrderPayload

Fields
Field Name Description
order - Order! The order created
Example
{"order": Order}

DecreaseProductVariantStockInput

Fields
Input Field Description
stockQuantity - Int! The number of quantity the stock decrease
Example
{"stockQuantity": 987}

DecreaseProductVariantStockPayload

Fields
Field Name Description
productVariant - ProductVariant! Updated Variant
Example
{"productVariant": ProductVariant}

DeleteProductInput

Fields
Input Field Description
id - ID! The id of product to delete
Example
{"id": "4"}

DeleteProductPayload

Fields
Field Name Description
id - ID! A globally-unique identifier
Example
{"id": "4"}

DeleteProductVariantInput

Fields
Input Field Description
id - ID! The id of product variant to delete
Example
{"id": "4"}

DeleteProductVariantPayload

Fields
Field Name Description
id - ID! The id of the variant deleted
Example
{"id": 4}

DeleteWebhookInput

Fields
Input Field Description
id - ID! The webhook id to delete
Example
{"id": "4"}

DeleteWebhookPayload

Fields
Field Name Description
id - ID! The id of the webhook deleted
Example
{"id": "4"}

ErrorCode

Description

The error code for global

Values
Enum Value Description

PRODUCT_JAN_CODE_DUPLICATED

(deprecated) janCode is already exists

PRODUCT_SKU_CODE_DUPLICATED

skuCode is already exists

PRODUCT_VARIANT_STOCK_OUT_OF_RANGE

The quantity of the stock must be greater than or equal to 0 or less than 9999
Example
"PRODUCT_JAN_CODE_DUPLICATED"

ID

Description

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID

Example
4

ImageForamt

Description

The format type of the image asset

Values
Enum Value Description

GIF

gif

JPEG

jpeg

ORIGIN

Origin

PNG

png

WEBP

webp
Example
"GIF"

ImagePreset

Description

The preset for specifying the size and shape of the image

Values
Enum Value Description

Default

Default size and shape

Large

Large

Medium

Medium

Mini

Mini

Small

Small

Square

Square

XLarge

XLarge

XMini

XMini

XSmall

XSmall

XXSmall

XXSmall
Example
"Default"

IncreaseProductVariantStockInput

Fields
Input Field Description
stockQuantity - Int! The number of quantity the stock increase
Example
{"stockQuantity": 123}

IncreaseProductVariantStockPayload

Fields
Field Name Description
productVariant - ProductVariant! Updated Variant
Example
{"productVariant": ProductVariant}

Int

Description

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1

Example
123

MallProductCategory

Fields
Input Field Description
mallType - MallType! The mall type id
productCategoryId - String! The product category id of mall
Example
{
  "mallType": "RAKUTEN_ICHIBA",
  "productCategoryId": "abc123"
}

MallType

Description

The mall types

Values
Enum Value Description

RAKUTEN_ICHIBA

The product category id of rakuten ichiba

UNSPECIFIED

This value is never used

YAHOO_AUCTION

The product category id of yahoo auction

YAHOO_SHOPPING

The product category id of yahoo shopping
Example
"RAKUTEN_ICHIBA"

Order

Description

Order is a customer's order information to purchase one or more items from a shop

Fields
Field Name Description
buyerShippingFee - Int! The shipping fee paid by buyer
cancelReasonType - CancelReasonType! The reason of cancelation
canceledAt - DateTime Date and time when the Order was cancelled
cancellable - Boolean! Whether the order can be cancelled
completedAt - DateTime Date and time when the Order was completed
createdAt - DateTime! Date and time when the Order was created
customerInfo - UserInfo!
id - ID! A globally-unique identifier
messages - [TransactionMessage!]! A list of the Order's Transaction Messages
orderCoupon - OrderCoupon The coupon consumed with order
paidAt - DateTime Date and time the buyer of that order paid
paymentDeadline - DateTime The deadline of the payment
paymentMethod - [PaymentMethod!]! A list of the Order's Payment Methods that a buyer chose
products - [OrderProduct!]! A list of the Order's products
salesFee - Int! Amount of the fee
shipping - Shipping Shipping information of the Order
status - OrderStatus! The status of the order
totalPrice - Int! Total amount of the order. This field includes sales fee and shipping charges but discount amount (e.g. coupon) is not included
updatedAt - DateTime Date and time when the Order was updated
Example
{
  "buyerShippingFee": 123,
  "cancelReasonType": "DEFECTIVE_PRODUCT",
  "canceledAt": "2007-12-03T10:15:30Z",
  "cancellable": false,
  "completedAt": "2007-12-03T10:15:30Z",
  "createdAt": "2007-12-03T10:15:30Z",
  "customerInfo": UserInfo,
  "id": "4",
  "messages": [TransactionMessage],
  "orderCoupon": OrderCoupon,
  "paidAt": "2007-12-03T10:15:30Z",
  "paymentDeadline": "2007-12-03T10:15:30Z",
  "paymentMethod": ["BALANCE"],
  "products": [OrderProduct],
  "salesFee": 987,
  "shipping": Shipping,
  "status": "CANCELED",
  "totalPrice": 987,
  "updatedAt": "2007-12-03T10:15:30Z"
}

OrderConnection

Fields
Field Name Description
edges - [OrderEdge!] A list of edges
pageInfo - PageInfo! Page information for Paging
Example
{
  "edges": [OrderEdge],
  "pageInfo": PageInfo
}

OrderCoupon

Description

OrderCoupon is a coupon issued by the shop. This does not contain the coupon issued by Mercari

Fields
Field Name Description
couponDisplayId - String! consumed coupon id to display
couponId - String! consumed coupon id
discountAmount - Int! discount amount by coupon
Example
{
  "couponDisplayId": "xyz789",
  "couponId": "abc123",
  "discountAmount": 123
}

OrderEdge

Fields
Field Name Description
node - Order! A node
Example
{"node": Order}

OrderProduct

Description

OrderProduct is a single product of an order

Fields
Field Name Description
name - String! The product name
price - Int! The product price
productAssetId - String! The product asset ID
productId - ID! product ID
variant - OrderVariant! order ID
Example
{
  "name": "xyz789",
  "price": 123,
  "productAssetId": "abc123",
  "productId": 4,
  "variant": OrderVariant
}

OrderStatus

Description

The transaction status of the order

Values
Enum Value Description

CANCELED

Represents the status that the order has been canceled

CANCELING

Represents the status that the order is canceling

COMPLETED

Represents the status that the order has been created and the shipping also has been completed

COMPLETING

Represents the status that the order is under processing to be completed

CREATING

Represents the status that the order is creating

UNSPECIFIED

This value is not used

WAITING_FOR_PAYMENT

Represents the status that the order has been created and waiting for the payment

WAITING_FOR_SHIPPING

Represents the status that the order has been created and waiting for the shipping
Example
"CANCELED"

OrderStatusFilter

Description

The filter for transaction status of the order

Values
Enum Value Description

CANCELED

Represents the status that the order has been canceled

CANCELING

Represents the status that the order is canceling

COMPLETED

Represents the status that the order has been created and the shipping also has been completed

COMPLETING

Represents the status that the order is under processing to be completed

WAITING_FOR_PAYMENT

Represents the status that the order has been created and waiting for the payment

WAITING_FOR_SHIPPING

Represents the status that the order has been created and waiting for the shipping
Example
"CANCELED"

OrderVariant

Fields
Field Name Description
id - ID! A globally-unique identifier
janCode - String The janCode of the variant
name - String The name of the variant
skuCode - String The skuCode of the variant
Example
{
  "id": 4,
  "janCode": "abc123",
  "name": "xyz789",
  "skuCode": "xyz789"
}

PageInfo

Fields
Field Name Description
endCursor - String Would be set if 'hasNextPage' field was true. You can use this value for 'after' argument of 'product' query or 'order' query
hasNextPage - Boolean! Would be true if the list has next page
Example
{
  "endCursor": "xyz789",
  "hasNextPage": false
}

PaymentMethod

Description

The possible payment methods

Values
Enum Value Description

BALANCE

Balance. (残高(売上金含む))

CARRIER_PAYMENT

Carrier Payment. (キャリア決済)

CREDIT_CARD

Credit Card. (クレジットカード)

DEFERRED

Merpay-smart-payment. (メルペイのあと払い) Cannot select in debugCreateOrder mutation

MERPAY_BILLING

Merpay-billing. (メルペイバーチャルカード)

MERPAY_PLUS_DEFERRED_PAYMENT

Merpay-plus-deferred-payment. (メルペイ定額払い)

MERPAY_SMART_PAYMENT

Merpay-smart-payment. (メルペイのあと払い)

STORE_PAYMENT

Convenience store/ATM. (コンビニ/ATM払い)

UNSPECIFIED

Example
"BALANCE"

PaymentMethodBalanceInput

Fields
Input Field Description
fundsAmount - Int!
pointAmount - Int!
Example
{"fundsAmount": 123, "pointAmount": 987}

PaymentMethodCreditCardInput

Fields
Input Field Description
amount - Int!
creditCardId - String Debug API does not require this parameter to be entered
payMethod - CreditCardPayMethodType!
payTimes - Int! Number of credit card payments. When the payMethod is ONETIME, this value must be 1
Example
{
  "amount": 987,
  "creditCardId": "xyz789",
  "payMethod": "INSTALLMENTS",
  "payTimes": 987
}

Product

Description

The Product resource represents a product in your shop

Fields
Field Name Description
assets - [Asset!]! Returns a list of Product's Assets not used anymore. use imageUrls instead.
brand - ProductBrand The Brand of the Product
categories - [ProductCategory!]! The Categories of the Product
condition - ProductCondition! The condition of the product
createdAt - DateTime! The Date and time when the product created
description - String! The description of the product
id - ID! A globally-unique identifier
imageUrls - [String!]! Returns a list of Product's Asset ImageUrls
name - String! The name of the product
price - Int! The price of the product. If the discount price was set to the Product, this value would be the discount price
shippingConfiguration - ShippingConfiguration The ShippingConfiguration of the product
shippingDuration - ShippingDuration! The shipping duration
shippingFromState - State! State where the Product is shipped from
shippingMethod - ShippingMethod! The shipping method
shippingPayer - ShippingPayer! Who pays for shipping, the sender or the recipient
status - ProductStatus! The product status. This controls visibility across all channel
updatedAt - DateTime! The Date and time when the product updated
variants - [ProductVariant!]! Returns a list of Variants that the Product has
Example
{
  "assets": [Asset],
  "brand": ProductBrand,
  "categories": [ProductCategory],
  "condition": "ALMOST_NEW",
  "createdAt": "2007-12-03T10:15:30Z",
  "description": "abc123",
  "id": "4",
  "imageUrls": ["xyz789"],
  "name": "abc123",
  "price": 987,
  "shippingConfiguration": ShippingConfiguration,
  "shippingDuration": "EIGHT_DAYS_OR_MORE_OR_UNDECIDED",
  "shippingFromState": State,
  "shippingMethod": "COOL",
  "shippingPayer": "BUYER",
  "status": "OPENED",
  "updatedAt": "2007-12-03T10:15:30Z",
  "variants": [ProductVariant]
}

ProductBrand

Fields
Field Name Description
id - ID! A globally-unique identifier
name - String! The name of the brand
nameEn - String! The English name of the brand
nameKana - String! The kana name of the brand
Example
{
  "id": "4",
  "name": "abc123",
  "nameEn": "xyz789",
  "nameKana": "xyz789"
}

ProductCategory

Fields
Field Name Description
hasChild - Boolean! This represents whether it has a child category. A category with hasChild true cannot be set to a product
id - ID! A globally-unique identifier
name - String! The name of the category
parentId - String The parent id of the category. This is used to build the tree structure
Example
{
  "hasChild": true,
  "id": "4",
  "name": "abc123",
  "parentId": "xyz789"
}

ProductCondition

Description

The possible product conditions

Values
Enum Value Description

ALMOST_NEW

Almost new. (未使用に近い)

BAD

Bad. (全体的に状態が悪い)

BRAND_NEW

Brand new. (新品、未使用)

CLEAN

Clean. (目立った傷や汚れなし)

DIRTY

Dirty. (傷や汚れあり)

LITTLE_DIRTY

Little dirty. (やや傷や汚れあり)

UNSPECIFIED

This value is never used
Example
"ALMOST_NEW"

ProductConditionOption

Fields
Field Name Description
name - String! The name for the option
type - ProductCondition! The enum of the option
Example
{"name": "abc123", "type": "ALMOST_NEW"}

ProductConnection

Fields
Field Name Description
edges - [ProductEdge!] A list of edges
pageInfo - PageInfo! Page information for Paging
Example
{
  "edges": [ProductEdge],
  "pageInfo": PageInfo
}

ProductEdge

Fields
Field Name Description
node - Product! A node
Example
{"node": Product}

ProductStatus

Description

The product status to control visibility

Values
Enum Value Description

OPENED

The Product will be public for all customers. (公開)

UNOPENED

The Product will be private. The only Product owner can see it. (非公開)

UNSPECIFIED

This value is never used
Example
"OPENED"

ProductStatusOption

Fields
Field Name Description
name - String! The name for the option
type - ProductStatus! The enum of the option
Example
{"name": "xyz789", "type": "OPENED"}

ProductVariant

Description

ProductVariant is a variation of a Product. One Product can have multiple ProductVariants. For example, A T-Shirt Product might have various colors like Red, Blue, and White. In this case, each type of color would be one ProductVariant

Fields
Field Name Description
id - ID! A globally-unique identifier
janCode - String The janCode of the variant
name - String The name of the Variant
product - Product! The product of the Variant
skuCode - String The skuCode of the variant
stockQuantity - Int! The quantity of the Stock
Example
{
  "id": 4,
  "janCode": "xyz789",
  "name": "abc123",
  "product": Product,
  "skuCode": "abc123",
  "stockQuantity": 987
}

ProductVariantBy

Description

ProductVariant can be retrieved by id or skuCode. A query or mutation with ProductVariantBy specified can identify ProductVariant by id or skuCode

Fields
Input Field Description
id - ID A global unique identifier
skuCode - ID The skuCode of the variant
Example
{"id": 4, "skuCode": "4"}

ProductVariantInput

Fields
Input Field Description
janCode - String The jan-code of the variant. The maximum length of the field is 14 characters. Only numbers, alphabetic, hyphens [-], and underscores [_] are allowed
name - String The name of the variant. The maximum length of the field is 16 characters
skuCode - String The sku-code of the variant. sku-code must be a unique value in your Shop. The maximum length of the field is 50 characters. Only numbers, alphabetic, hyphens [-], and underscores [_] are allowed
stockQuantity - Int The number of stocks of the variant. The quantity of the stock will be overwritten by this value
Example
{
  "janCode": "xyz789",
  "name": "abc123",
  "skuCode": "xyz789",
  "stockQuantity": 123
}

Shipping

Description

Shipping is shipping information

Fields
Field Name Description
id - ID! A globally-unique identifier
method - String! Shipping method of the shipped package. This value is one of "UNDECIDED"(出品者が手配), "COOL"(クール便), "MERCARI_SHIPPING_YAMATO"(らくらくメルカリ便), "MERCARI_SHIPPING_YAMATO_COOL_REFRIGERATED"(クールメリカリ便(冷蔵)), or "MERCARI_SHIPPING_YAMATO_COOL_FROZEN"(クールメルカリ便(冷凍))
senderAddress - ShippingAddress An address shipped from
shippingAddress - ShippingAddress Destination shipping address
trackingCode - String! The code assigned to packages when they are shipped
Example
{
  "id": "4",
  "method": "abc123",
  "senderAddress": ShippingAddress,
  "shippingAddress": ShippingAddress,
  "trackingCode": "xyz789"
}

ShippingAddress

Description

The address the user has. Users can have multiple addresses

Fields
Field Name Description
address1 - String The first line of the address. Typically the street address
address2 - String The second line of the address. Typically the number of the apartment, suite, or unit
city - String The name of the city, district, village, or town
country - String! The name of the country
firstName - String The first name of the customer
firstNameEN - String The first name of the customer in English. This field is provided only to specific shops that require international shipping, and for other shops, it is always set to null
firstNameKana - String The first kana-name of the customer
lastName - String The last name of the customer
lastNameEN - String The last name of the customer in English. This field is provided only to specific shops that require international shipping, and for other shops, it is always set to null
lastNameKana - String The last kana-name of the customer
phoneNumber - String A unique phone number for the customer
postalCode - String! The postal code of the address
state - State! State where the Product is shipped from
Example
{
  "address1": "xyz789",
  "address2": "xyz789",
  "city": "abc123",
  "country": "abc123",
  "firstName": "xyz789",
  "firstNameEN": "abc123",
  "firstNameKana": "abc123",
  "lastName": "xyz789",
  "lastNameEN": "xyz789",
  "lastNameKana": "xyz789",
  "phoneNumber": "xyz789",
  "postalCode": "xyz789",
  "state": State
}

ShippingConfiguration

Description

The ShippingConfiguration resource represents a shipping configuration of your shop

Fields
Field Name Description
createdAt - DateTime! Date and time when the shipping configuration was created
details - [ShippingConfigurationDetail!]! The detail of the destinations
displayId - String! The id defined by users (This value is presented as 送料ID in the management screen
id - ID! A globally-unique identifier
title - String! The name of the shipping configuration
type - ShippingConfigurationType! The type of the shipping configuration
updatedAt - DateTime! Date and time when the shipping configuration was updated
Example
{
  "createdAt": "2007-12-03T10:15:30Z",
  "details": [ShippingConfigurationDetail],
  "displayId": "abc123",
  "id": "4",
  "title": "xyz789",
  "type": "NATIONWIDE_EQUAL",
  "updatedAt": "2007-12-03T10:15:30Z"
}

ShippingConfigurationConnection

Fields
Field Name Description
edges - [ShippingConfigurationEdge!] A list of edges
pageInfo - PageInfo! Page information for Paging
Example
{
  "edges": [ShippingConfigurationEdge],
  "pageInfo": PageInfo
}

ShippingConfigurationDetail

Description

The detail of shipping configuration

Fields
Field Name Description
destination - ShippingConfigurationDetailDestination! The destination to which the fee apply
fee - Int! Shipping fee for the destination
Example
{"destination": "NATIONWIDE_EQUAL", "fee": 987}

ShippingConfigurationDetailDestination

Description

The available destinations for shipping configuration detail

Values
Enum Value Description

NATIONWIDE_EQUAL

全国一律

PREFECTURE_AICHI

愛知県(都道府県別)

PREFECTURE_AKITA

秋田県(都道府県別)

PREFECTURE_AOMORI

青森県(都道府県別)

PREFECTURE_CHIBA

千葉県(都道府県別)

PREFECTURE_EHIME

愛媛県(都道府県別)

PREFECTURE_FUKUI

福井県(都道府県別)

PREFECTURE_FUKUOKA

福岡県(都道府県別)

PREFECTURE_FUKUSHIMA

福島県(都道府県別)

PREFECTURE_GIFU

岐阜県(都道府県別)

PREFECTURE_GUNMA

群馬県(都道府県別)

PREFECTURE_HIROSHIMA

広島県(都道府県別)

PREFECTURE_HOKKAIDO

北海道(都道府県別)

PREFECTURE_HYOGO

兵庫県(都道府県別)

PREFECTURE_IBARAKI

茨城県(都道府県別)

PREFECTURE_ISHIKAWA

石川県(都道府県別)

PREFECTURE_IWATE

岩手県(都道府県別)

PREFECTURE_KAGAWA

香川県(都道府県別)

PREFECTURE_KAGOSHIMA

鹿児島県(都道府県別)

PREFECTURE_KANAGAWA

神奈川県(都道府県別)

PREFECTURE_KOCHI

高知県(都道府県別)

PREFECTURE_KUMAMOTO

熊本県(都道府県別)

PREFECTURE_KYOTO

京都府(都道府県別)

PREFECTURE_MIE

三重県(都道府県別)

PREFECTURE_MIYAGI

宮城県(都道府県別)

PREFECTURE_MIYAZAKI

宮崎県(都道府県別)

PREFECTURE_NAGANO

長野県(都道府県別)

PREFECTURE_NAGASAKI

長崎県(都道府県別)

PREFECTURE_NARA

奈良県(都道府県別)

PREFECTURE_NIIGATA

新潟県(都道府県別)

PREFECTURE_OITA

大分県(都道府県別)

PREFECTURE_OKAYAMA

岡山県(都道府県別)

PREFECTURE_OKINAWA

沖縄県(都道府県別)

PREFECTURE_OSAKA

大阪府(都道府県別)

PREFECTURE_SAGA

佐賀県(都道府県別)

PREFECTURE_SAITAMA

埼玉県(都道府県別)

PREFECTURE_SHIGA

滋賀県(都道府県別)

PREFECTURE_SHIMANE

島根県(都道府県別)

PREFECTURE_SHIZUOKA

静岡県(都道府県別)

PREFECTURE_TOCHIGI

栃木県(都道府県別)

PREFECTURE_TOKUSHIMA

徳島県(都道府県別)

PREFECTURE_TOKYO

東京都(都道府県別)

PREFECTURE_TOTTORI

鳥取県(都道府県別)

PREFECTURE_TOYAMA

富山県(都道府県別)

PREFECTURE_WAKAYAMA

和歌山県(都道府県別)

PREFECTURE_YAMAGATA

山形県(都道府県別)

PREFECTURE_YAMAGUCHI

山口県(都道府県別)

PREFECTURE_YAMANASHI

山梨県(都道府県別)

REGION_CHUBU

中部(地域別)

REGION_CHUGOKU

中国(地域別)

REGION_HOKKAIDO

北海道(地域別)

REGION_HOKURIKU

北陸(地域別)

REGION_KANSAI

関西(地域別)

REGION_KANTO

関東(地域別)

REGION_KITATOHOKU

北東北(地域別)

REGION_KYUSHU

九州(地域別)

REGION_MINAMITOHOKU

南東北(地域別)

REGION_OKINAWA

沖縄(地域別)

REGION_SHIKOKU

四国(地域別)

REGION_SHINETSU

信越(地域別)

UNSPECIFIED

This value is never used
Example
"NATIONWIDE_EQUAL"

ShippingConfigurationEdge

Fields
Field Name Description
node - ShippingConfiguration! A node
Example
{"node": ShippingConfiguration}

ShippingConfigurationType

Description

The available types of shipping configuration

Values
Enum Value Description

NATIONWIDE_EQUAL

Nationwide Equal.(全国一律)

PREFECTURE

Prefecture.(都道府県別設定)

REGION

Region.(地域別設定)

UNSPECIFIED

This value is never used
Example
"NATIONWIDE_EQUAL"

ShippingDuration

Description

The possible types of shipping times

Values
Enum Value Description

EIGHT_DAYS_OR_MORE_OR_UNDECIDED

Within ninety days. (90日以内で発送)

EIGHT_TO_FOURTEEN_DAYS

Eight to fourteen days. (8〜14日で発送)

FOUR_TO_SEVEN_DAYS

Four to seven days. (4〜7日で発送)

ONE_TO_TWO_DAYS

One to two days. (1〜2日で発送)

TWO_TO_THREE_DAYS

Two to three days. (2〜3日で発送)

UNSPECIFIED

This value is never used
Example
"EIGHT_DAYS_OR_MORE_OR_UNDECIDED"

ShippingDurationOption

Fields
Field Name Description
name - String! The name for the option
type - ShippingDuration! The enum of the option
Example
{
  "name": "abc123",
  "type": "EIGHT_DAYS_OR_MORE_OR_UNDECIDED"
}

ShippingMethod

Description

The possible shipping methods

Values
Enum Value Description

COOL

Delivers their product with a shipping method that keeps refrigerated for its products. (クール便)

MERCARI_SHIPPING_YAMATO

Delivers its products with Mercari-Shipping. (らくらくメルカリ便)

MERCARI_SHIPPING_YAMATO_COOL_FROZEN

Delivers its products that must be frozen with Cool-Mercari-Shipping. (クールメルカリ便(冷凍))

MERCARI_SHIPPING_YAMATO_COOL_REFRIGERATED

Delivers its products with Cool-Mercari-Shipping. (クールメルカリ便(冷蔵))

UNDECIDED

The shipping is undecided. A Shop can choose any kind of Shipping method for their delivery. 未定(出品者が手配)

UNSPECIFIED

This value is never used
Example
"COOL"

ShippingMethodOption

Fields
Field Name Description
name - String! The name for the option
type - ShippingMethod! The enum of the option
Example
{"name": "abc123", "type": "COOL"}

ShippingPayer

Description

The possible shipping payers

Values
Enum Value Description

BUYER

The buyer pays shipping fee. 送料別(購入者負担)

SELLER

The seller pays shipping fee. 送料込み(出品者負担)

UNSPECIFIED

This value is never used
Example
"BUYER"

ShippingPayerOption

Fields
Field Name Description
name - String! The name for the option
type - ShippingPayer! The enum of the option
Example
{"name": "xyz789", "type": "BUYER"}

Shop

Description

Shop represents a collection of the general settings and information about the shop

Fields
Field Name Description
businessKind - BusinessKind! Returns the business kind of the shop
createdAt - DateTime! The date and time when the shop was created
description - String! The shop's description used in shop page
id - ID! A globally-unique identifier
name - String! The shop's name
Example
{
  "businessKind": "CORPORATE",
  "createdAt": "2007-12-03T10:15:30Z",
  "description": "abc123",
  "id": "4",
  "name": "abc123"
}

State

Description

State is the area from which the shipment will be sent

Fields
Field Name Description
id - ID! A globally-unique identifier
name - String! The name of the state
Example
{"id": 4, "name": "abc123"}

String

Description

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text

Example
"xyz789"

TransactionMessage

Description

TransactionMessage is a record of message exchanges regarding the transaction

Fields
Field Name Description
createdAt - DateTime! The Date and time when the transaction-message created
id - ID! A globally-unique identifier
message - String! A message posted by users
role - TransactionMessageAuthorRole! The role of author
Example
{
  "createdAt": "2007-12-03T10:15:30Z",
  "id": "4",
  "message": "xyz789",
  "role": "BUYER"
}

TransactionMessageAuthorRole

Description

The author's role for message

Values
Enum Value Description

BUYER

A buyer sent this message

SELLER

A seller sent this message

UNSPECIFIED

This value is never used
Example
"BUYER"

UpdateProductInput

Fields
Input Field Description
brandId - String The brand id of the product. Use productBrands query to find a brandId. It shows a list of Product Brand information that includes brandId
categoryId - String The category id of the product. Use productCategories query to find a categoryId. It shows a list of Product Category information that includes categoryId. Only categories with no descendants can be specified
condition - ProductCondition The condition of the product
description - String The description of the product. The maximum length of the field is 3000 characters
id - ID! The id of product to update
imageUrls - [String!] The list of asset URLs. You can use only 'https' schema for the URLs. The maximum size of the list is 20
name - String The name of the product. The maximum length of the field is 130 characters
price - Int The price of the product. It must be between 300 and 9999999
shippingConfigurationId - String The shipping configuration id of the product. This parameter is required when the shippingPayer is Buyer. To unset the current shippingConfigurationId, specify an empty string when updating the product. When the shippingConfigurationId is null in the update request, the current setting is kept
shippingDuration - ShippingDuration The shipping duration
shippingFromStateId - String The area to be shipped from. Use states query to find a stateId. It shows a list of State information that includes StateId
shippingMethod - ShippingMethod The shipping method
shippingPayer - ShippingPayer Who pays for shipping, the sender or the recipient
status - ProductStatus The status of the product visibility
Example
{
  "brandId": "xyz789",
  "categoryId": "abc123",
  "condition": "ALMOST_NEW",
  "description": "xyz789",
  "id": 4,
  "imageUrls": ["abc123"],
  "name": "xyz789",
  "price": 123,
  "shippingConfigurationId": "",
  "shippingDuration": "EIGHT_DAYS_OR_MORE_OR_UNDECIDED",
  "shippingFromStateId": "abc123",
  "shippingMethod": "COOL",
  "shippingPayer": "SELLER",
  "status": "OPENED"
}

UpdateProductPayload

Fields
Field Name Description
product - Product! Updated Product
Example
{"product": Product}

UpdateProductVariantInput

Fields
Input Field Description
janCode - String The jan-code of the variant. The maximum length of the field is 14 characters. Only numbers, alphabetic, hyphens [-], and underscores [_] are allowed
name - String The name of the variant. The maximum length of the field is 16 characters
stockQuantity - Int The number of stocks of the variant
Example
{
  "janCode": "xyz789",
  "name": "xyz789",
  "stockQuantity": 123
}

UpdateProductVariantPayload

Fields
Field Name Description
productVariant - ProductVariant! Updated Variant
Example
{"productVariant": ProductVariant}

UpdateProductVariantSKUInput

Fields
Input Field Description
id - ID! The id of the variant to update
skuCode - String! The sku-code of the variant. sku-code must be a unique value in your Shop. The maximum length of the field is 50 characters. Only numbers, alphabetic, hyphens [-], and underscores [_] are allowed
Example
{
  "id": "4",
  "skuCode": "abc123"
}

UpdateProductVariantSKUPayload

Fields
Field Name Description
productVariant - ProductVariant! The product variant updated
Example
{"productVariant": ProductVariant}

UpdateProductVariantsInput

Fields
Input Field Description
by - ProductVariantBy! The identifier of the variant. Either id or skuCode is specified
input - UpdateProductVariantInput! The update parameters of the variant
Example
{
  "by": ProductVariantBy,
  "input": UpdateProductVariantInput
}

UpdateProductVariantsPayload

Fields
Field Name Description
productVariants - [ProductVariant!]! The product variants updated
Example
{"productVariants": [ProductVariant]}

UpdateProductsPayload

Fields
Field Name Description
products - [Product!]! The products updated
Example
{"products": [Product]}

UpdateShippingTrackingCodeInput

Fields
Input Field Description
orderId - String! The order id to add shipping tracking code
trackingCode - String! The tracking code of the shipping
Example
{
  "orderId": "abc123",
  "trackingCode": "xyz789"
}

UpdateShippingTrackingCodePayload

Fields
Field Name Description
order - Order! Updated Order
Example
{"order": Order}

UserInfo

Description

UserInfo represents an user information

Fields
Field Name Description
nickname - String! the nickname of the user
pictureUrl - String the picture url of the user
Example
{
  "nickname": "abc123",
  "pictureUrl": "abc123"
}

Webhook

Description

Webhook represents a per-topic webhook setting

Fields
Field Name Description
apiVersion - String! The api version of the webhook topic
createdAt - DateTime! The date and time when the webhook was created
endPoint - String! The endPoint to handle the webhook topic
id - ID! A globally-unique identifier
topic - WebhookTopic! The topic you want to receive the event in the endpoint
Example
{
  "apiVersion": "abc123",
  "createdAt": "2007-12-03T10:15:30Z",
  "endPoint": "xyz789",
  "id": 4,
  "topic": "ORDER_CANCELED"
}

WebhookTopic

Description

The topic you want to receive the event in this endpoint

Values
Enum Value Description

ORDER_CANCELED

order_canceled topic for webhook

ORDER_CREATED

order_created topic for webhook

ORDER_PAID

order_paid topic for webhook

PRODUCT_ADMINISTRATOR_DELETED

product_admin_deleted topic for webhook

TRANSACTIONMESSAGE_CREATED

transaction_message_created topic for webhook

UNSPECIFIED

This value is never used
Example
"ORDER_CANCELED"