Public
Documentation Settings

Magento 2 Milestone GraphQL

POSTGet Customer Info ( have customer group )

{{magento_base_url}}/graphql

When enable Mageplaza Milestone GraphQL, you can get customer group by customer query.

HEADERS
Authorization

Bearer {{customer_token}}

Example Request
curl
curl --location -g '{{magento_base_url}}/graphql' \
--header 'Authorization: Bearer {{customer_token}}' \
--header 'Content-Type: application/json' \
--data '{"query":"query {\r\n\tcustomer {\r\n\t\tfirstname\r\n\t\temail\r\n\t\tmp_milestone {\r\n\t\t\tcustomer_group\r\n\t\t}\r\n\t\taddresses {\r\n\t\t\tid\r\n\t\t\tcity\r\n\t\t}\r\n\t\tcreated_at\r\n\t\tdate_of_birth\r\n\t\tdefault_billing\r\n\t\tdefault_shipping\r\n\t\tgender\r\n\t\tis_subscribed\r\n\t\tlastname\r\n\t\tmiddlename\r\n\t\tprefix\r\n\t\tsuffix\r\n\t\ttaxvat\r\n\t\twishlist {\r\n\t\t\tid\r\n\t\t}\r\n\t}\r\n}\r\n","variables":{}}'
200 OK
Example Response
json
{
  "data": {
    "customer": {
      "firstname": "Veronica",
      "email": "roni_cost@example.com",
      "mp_milestone": {
        "customer_group": "General"
      },
      "addresses": [
        {
          "id": 1,
          "city": "Calder"
        }
      ],
      "created_at": "2020-11-19 02:34:55",
      "date_of_birth": "1973-12-15",
      "default_billing": "1",
      "default_shipping": "1",
      "gender": 2,
      "is_subscribed": false,
      "lastname": "Costello",
      "middlename": null,
      "prefix": null,
      "suffix": null,
      "taxvat": null,
      "wishlist": {
        "id": "1"
      }
    }
  }
}
Date

Thu, 10 Dec 2020 08:30:36 GMT

Server

Apache/2.4.18 (Ubuntu)

Expires

Tue, 10 Dec 2019 08:30:39 GMT

Cache-Control

max-age=0, must-revalidate, no-cache, no-store

Pragma

no-cache

Set-Cookie

PHPSESSID=2i2br3np7v1njqo2ibkk8b67u3; expires=Thu, 10-Dec-2020 09:30:39 GMT; Max-Age=3600; path=/quynh/ce236a; domain=192.168.1.100; HttpOnly

Set-Cookie

private_content_version=8f5fd4ee29c4e57ee312be7b56f7ddb8; expires=Sun, 08-Dec-2030 08:30:39 GMT; Max-Age=315360000; path=/

X-Magento-Cache-Control

max-age=0, must-revalidate, no-cache, no-store

X-Magento-Tags

FPC

X-Magento-Cache-Debug

MISS

X-Content-Type-Options

nosniff

X-XSS-Protection

1; mode=block

X-Frame-Options

SAMEORIGIN

Content-Length

407

Keep-Alive

timeout=5, max=100

Connection

Keep-Alive

Content-Type

application/json