1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Shopify API 顧客新規登録時、メタフィールドにデータを登録する

Last updated at Posted at 2022-01-19

ググっても見つけられなかったので、ドキュメントの情報から推測してできるかなと試したら登録できたのでメモ

目的

顧客新規登録時に顧客メタフィールドの定義で作成した項目にデータを登録したい。

Shopify API

利用バージョン

2022-01

顧客登録エンドポイント

/admin/api/2022-01/customers.json

BODY

顧客メタフィールドに my_fields.id を作成した例

{
  "customer": {
    "first_name": "Steve",
    "last_name": "Lastnameson",
    "email": "steve.lastnameson@example.com",
    "metafields": [{
        "namespace": "my_fields",
        "key": "id",
        "value": 1234567890
    }]
  }
}
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?