Joy dev docs
User guide
  • Joy Javascript API
    • Introduction to the Joy SDK
    • Public API get methods
    • Public API action methods
    • Widget methods
  • Joy REST API
    • Customers
    • Earning programs
    • Redeeming programs
    • Points history
    • Rewards
    • Point manupulation
    • VIP Tiers
    • Referral
  • JOY OPEN API V2
    • Customer
Powered by GitBook
On this page
  1. Joy REST API

Customers

PreviousWidget methodsNextEarning programs

Last updated 3 months ago

List customers

get
Header parameters
X-Joy-Loyalty-App-KeystringOptional

App ID of your shop which retrieved from the Settings page

Example: {{appKey}}
X-Joy-Loyalty-Secret-KeystringOptional

Secret Key of your shop which retrieved from the Settings page

Example: {{secretKey}}
Responses
200
OK
application/json
get
GET /rest_api/v1/customers HTTP/1.1
Host: dev-api.joy.so
Accept: */*
200

OK

{
  "data": [
    {
      "id": "o9AQeUCXYDjbeFm7vAKy",
      "shopifyCustomerId": 7603687882987,
      "email": "example@avadagroup.com",
      "point": 999600,
      "createdAt": "2024-08-26T10:28:33.862Z",
      "updatedAt": "2024-09-26T07:53:28.014Z",
      "totalSpent": 0,
      "orderCount": 0,
      "acceptsMarketing": false,
      "name": "anh anh",
      "state": "enabled",
      "tierId": "dvlOpwxsdATG5RYgr0gz",
      "tierPoint": 0,
      "type": "member",
      "shopId": "umN0f3GKyQC3XS1AwVWg",
      "hasPoint": true,
      "urlReferral": "https://inviteee.to/i/g5ND",
      "latestActivity": "2024-08-27T08:24:07.578Z",
      "phone": null,
      "hasTier": false,
      "pointsRemain": 500
    }
  ],
  "pageInfo": {
    "hasPre": false,
    "hasNext": false
  },
  "count": 1
}

Get a customer

get
Path parameters
customerIdstringRequired
Header parameters
X-Joy-Loyalty-App-KeystringOptional

App ID of your shop which retrieved from the Settings page

Example: {{appKey}}
X-Joy-Loyalty-Secret-KeystringOptional

Secret of your shop which retrieved from /settings/managingKey

Example: {{secretKey}}
Responses
200
OK
application/json
get
GET /rest_api/v1/customers/{customerId} HTTP/1.1
Host: dev-api.joy.so
Accept: */*
200

OK

{
  "data": {
    "id": "o9AQeUCXYDjbeFm7vAKy",
    "shopifyCustomerId": 7603687882987,
    "totalSpent": 0,
    "orderCount": 0,
    "name": "anh anh",
    "state": "enabled",
    "shopId": "umN0f3GKyQC3XS1AwVWg",
    "type": "member",
    "acceptsMarketing": false,
    "email": "example@avadagroup.com",
    "createdAt": "2024-08-26T10:28:33.862Z",
    "hasPoint": true,
    "urlReferral": "https://inviteee.to/i/g5ND",
    "latestActivity": "2024-08-27T08:24:07.578Z",
    "point": 999600,
    "updatedAt": "2024-09-26T07:53:28.014Z",
    "phone": null,
    "tierId": "dvlOpwxsdATG5RYgr0gz",
    "hasTier": false,
    "tierPoint": 0,
    "tierName": "Silver",
    "pointsRemain": 500
  }
}

Get customer by Shopify ID

get

Retrieve customer information using Shopify customer ID

Path parameters
idintegerRequired

Shopify customer ID

Responses
200
OK
application/json
get
GET /customers/shopify-id/{id} HTTP/1.1
Host: dev-api.joy.so
Accept: */*
200

OK

{
  "data": {
    "email": "text",
    "name": "text",
    "type": "text",
    "state": "text",
    "orderCount": 1,
    "totalSpent": 1,
    "shopifyCustomerId": 1,
    "acceptsMarketing": true,
    "phone": "text",
    "shopId": "text",
    "insertedBigquery": true,
    "earnSignUp": true,
    "hasPoint": true,
    "like_facebook": true,
    "usedMilestoneEarnPoint": [
      1
    ],
    "latestActivity": "2025-05-16T22:03:05.984Z",
    "point": 1,
    "hasTier": true,
    "tierUpdatedAt": "2025-05-16T22:03:05.984Z",
    "tierId": "text",
    "tierPoint": 1,
    "createdAt": "2025-05-16T22:03:05.984Z",
    "updatedAt": "2025-05-16T22:03:05.984Z",
    "id": "text",
    "pointsRemain": 1,
    "tierName": "text"
  }
}
  • GETList customers
  • GETGet a customer
  • GETGet customer by Shopify ID