{"info":{"_postman_id":"25e55c0c-1754-40d1-a5c9-6548e481c294","name":"Ako Apps Integration","description":"<html><head></head><body><p>Welcome to the Ako apps Integration Documentation, where we guide you through seamlessly integrating Ako apps with the Shopify Admin API.</p>\n<p>Both Ako Marketing and Ako CVS seamlessly integrates with the Shopify Admin API, eliminating the need for additional APIs. Leverage the power of Shopify's existing infrastructure to enhance your integration with precision and ease. If you'd like to directly access the Ako Marketing API, you can refer to this <a href=\"https://developers.akohub.com/#ako-marketing-api\">paragraph</a>.</p>\n<p>The Shopify Admin API supports both <a href=\"https://shopify.dev/docs/api/admin-graphql\">GraphQL</a> and <a href=\"https://shopify.dev/docs/api/admin-rest\">REST</a>. The examples provided in this documentation assume a foundational understanding of how to use the Shopify Admin API, i.e., you know how to configure the three variables in the following table.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Variable</th>\n<th>Description</th>\n<th><strong>Example</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>shopify-store</td>\n<td>It is the web address where your online store is hosted. Ensure accurate input of your Shopify store URL to establish a connection with the correct store instance.</td>\n<td><code>yourstorename.myshopify.com</code></td>\n</tr>\n<tr>\n<td>shopify-app-token</td>\n<td>This token starts with the prefix shpat and is unique to your store. Include your token as a <code>X-Shopify-Access-Token</code> header on all API queries.</td>\n<td><code>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</code></td>\n</tr>\n<tr>\n<td>shopify-api-version</td>\n<td>The Shopify API version indicates the specific release version of the Shopify API that your integration is designed to work with.</td>\n<td><code>2023-10</code></td>\n</tr>\n</tbody>\n</table>\n</div><p>Refer to the Shopify documentation for comprehensive guidance on authentication, endpoints, rate limits, and general API usage.</p>\n<h1 id=\"ako-marketing-api\">Ako Marketing API</h1>\n<p>The Ako Marketing API lets you integrate customer data and loyalty actions (e.g., points changes) into your stack. This guide covers authentication and common customer operations.</p>\n<p>Before any API operations, you will need to get an access token via authentication process.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Ako Marketing API","slug":"ako-marketing-api"}],"owner":"31929572","collectionId":"25e55c0c-1754-40d1-a5c9-6548e481c294","publishedId":"2s9Ykq81Bw","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"ED8936"},"publishDate":"2025-10-31T10:57:29.000Z"},"item":[{"name":"Get points, tier, birthday, gender and referralCode of a customer","item":[{"name":"GraphQL","id":"379a6dc7-2ed4-41e4-859b-59863da2e8e2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Shopify-Access-Token","value":"{{shopify-app-token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query {\n  customer(id: \"gid://shopify/Customer/6223356756011\") {\n    points: metafield(\n        namespace: \"akohub\"\n        key: \"points\"\n    ) {\n        value\n    }\n    tier: metafield(\n        namespace: \"akohub\"\n        key: \"tier\"\n    ) {\n        value\n    }\n    birthday: metafield(\n        namespace: \"akohub\"\n        key: \"birthday\"\n    ) {\n        value\n    }\n    gender: metafield(\n        namespace: \"akohub\"\n        key: \"gender\"\n    ) {\n        value\n    }\n    referralCode: metafield(\n        namespace: \"akohub\"\n        key: \"referralCode\"\n    ) {\n        value\n    }\n  }\n}","variables":""}},"url":"https://{{shopify-store}}/admin/api/{{shopify-api-version}}/graphql.json","urlObject":{"protocol":"https","path":["admin","api","{{shopify-api-version}}","graphql.json"],"host":["{{shopify-store}}"],"query":[],"variable":[]}},"response":[{"id":"5a3bf225-0dd1-4912-be9a-badfedbd284b","name":"Success","originalRequest":{"method":"POST","header":[{"key":"X-Shopify-Access-Token","value":"{{shopify-app-token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query {\n  customer(id: \"gid://shopify/Customer/6223356756011\") {\n    points: metafield(\n        namespace: \"akohub\"\n        key: \"points\"\n    ) {\n        value\n    }\n    tier: metafield(\n        namespace: \"akohub\"\n        key: \"tier\"\n    ) {\n        value\n    }\n    birthday: metafield(\n        namespace: \"akohub\"\n        key: \"birthday\"\n    ) {\n        value\n    }\n    gender: metafield(\n        namespace: \"akohub\"\n        key: \"gender\"\n    ) {\n        value\n    }\n    referralCode: metafield(\n        namespace: \"akohub\"\n        key: \"referralCode\"\n    ) {\n        value\n    }\n  }\n}","variables":""}},"url":"https://{{shopify-store}}/admin/api/{{shopify-api-version}}/graphql.json"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 22 Dec 2023 07:59:55 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Sorting-Hat-PodId","value":"112"},{"key":"X-Sorting-Hat-ShopId","value":"7648215153"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Referrer-Policy","value":"origin-when-cross-origin"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-ShopId","value":"7648215153"},{"key":"X-ShardId","value":"112"},{"key":"X-Stats-UserId","value":""},{"key":"X-Stats-ApiClientId","value":"6389563"},{"key":"X-Stats-ApiPermissionId","value":"356878549105"},{"key":"X-Shopify-API-Version","value":"2023-10"},{"key":"Content-Language","value":"en"},{"key":"Strict-Transport-Security","value":"max-age=7889238"},{"key":"Server-Timing","value":"processing;dur=59, graphql;desc=\"admin/query/other\""},{"key":"Server-Timing","value":"cfRequestDuration;dur=558.999777"},{"key":"X-Shopify-Stage","value":"production"},{"key":"Content-Security-Policy","value":"default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://* shopify-pos://*; block-all-mixed-content; child-src 'self' https://* shopify-pos://*; connect-src 'self' wss://* https://*; frame-ancestors 'none'; img-src 'self' data: blob: https:; script-src https://cdn.shopify.com https://cdn.shopifycdn.net https://checkout.shopifycs.com https://api.stripe.com https://mpsnare.iesnare.com https://appcenter.intuit.com https://www.paypal.com https://js.braintreegateway.com https://c.paypal.com https://maps.googleapis.com https://www.google-analytics.com https://v.shopify.com 'self' 'unsafe-inline' 'unsafe-eval'; upgrade-insecure-requests; report-uri /csp-report?source%5Baction%5D=query&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fgraphql&source%5Bsection%5D=admin_api&source%5Buuid%5D=f586e6c3-d1d1-4de8-ac3f-309fd9e81696"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"1; mode=block; report=/xss-report?source%5Baction%5D=query&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fgraphql&source%5Bsection%5D=admin_api&source%5Buuid%5D=f586e6c3-d1d1-4de8-ac3f-309fd9e81696"},{"key":"X-Request-ID","value":"f586e6c3-d1d1-4de8-ac3f-309fd9e81696"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=IEoH0618XdQLk5fT3boaJKnfjtot5HyQXNVwBaHDacTLnHYdbBohI%2F6uZSOCcsugrVYoFe2tsbGXaujkQVIiWEM89l6zJE8HOFeKJaW3CgjtJhBIbjuZk3p3BzDg9ZfAPWVGgTOadv8L0wj7cwa9KFk%3D\"}],\"group\":\"cf-nel\",\"max_age\":604800}"},{"key":"NEL","value":"{\"success_fraction\":0.01,\"report_to\":\"cf-nel\",\"max_age\":604800}"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8396d3ff690eafb1-NRT"},{"key":"Content-Encoding","value":"br"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"customer\": {\n            \"points\": {\n                \"value\": \"100\"\n            },\n            \"tier\": {\n                \"value\": \"Bronze\"\n            },\n            \"birthday\": {\n                \"value\": \"1992-09-11\"\n            },\n            \"gender\": {\n                \"value\": \"Man\"\n            },\n            \"referralCode\": {\n                \"value\": \"qduLGThznByA\"\n            }\n        }\n    },\n    \"extensions\": {\n        \"cost\": {\n            \"requestedQueryCost\": 6,\n            \"actualQueryCost\": 6,\n            \"throttleStatus\": {\n                \"maximumAvailable\": 2000.0,\n                \"currentlyAvailable\": 1994,\n                \"restoreRate\": 100.0\n            }\n        }\n    }\n}"}],"_postman_id":"379a6dc7-2ed4-41e4-859b-59863da2e8e2"},{"name":"REST","id":"d2448684-84b5-400a-9f29-056ef02149e0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Shopify-Access-Token","value":"{{shopify-app-token}}","type":"text"}],"url":"https://{{shopify-store}}/admin/api/{{shopify-api-version}}/customers/6223356756011/metafields.json?namespace=akohub","urlObject":{"protocol":"https","path":["admin","api","{{shopify-api-version}}","customers","6223356756011","metafields.json"],"host":["{{shopify-store}}"],"query":[{"key":"namespace","value":"akohub"}],"variable":[]}},"response":[{"id":"cb0179f4-debf-4d6c-8d6c-886ad338f0f2","name":"Success","originalRequest":{"method":"GET","header":[{"key":"X-Shopify-Access-Token","value":"{{shopify-app-token}}","type":"text"}],"url":{"raw":"https://{{shopify-store}}/admin/api/{{shopify-api-version}}/customers/6223356756011/metafields.json?namespace=akohub","protocol":"https","host":["{{shopify-store}}"],"path":["admin","api","{{shopify-api-version}}","customers","6223356756011","metafields.json"],"query":[{"key":"namespace","value":"akohub"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 24 Dec 2023 03:42:34 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Sorting-Hat-PodId","value":"176"},{"key":"X-Sorting-Hat-ShopId","value":"59007467697"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Referrer-Policy","value":"origin-when-cross-origin"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-ShopId","value":"59007467697"},{"key":"X-ShardId","value":"176"},{"key":"X-Stats-UserId","value":""},{"key":"X-Stats-ApiClientId","value":"6536061"},{"key":"X-Stats-ApiPermissionId","value":"371370623153"},{"key":"X-Shopify-API-Terms","value":"By accessing or using the Shopify API you agree to the Shopify API License and Terms of Use at https://www.shopify.com/legal/api-terms"},{"key":"X-Shopify-API-Version","value":"2023-10"},{"key":"HTTP_X_SHOPIFY_SHOP_API_CALL_LIMIT","value":"1/40"},{"key":"X-Shopify-Shop-Api-Call-Limit","value":"1/40"},{"key":"Strict-Transport-Security","value":"max-age=7889238"},{"key":"Server-Timing","value":"processing;dur=61"},{"key":"Server-Timing","value":"cfRequestDuration;dur=279.999971"},{"key":"X-Shopify-Stage","value":"production"},{"key":"Content-Security-Policy","value":"default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://* shopify-pos://*; block-all-mixed-content; child-src 'self' https://* shopify-pos://*; connect-src 'self' wss://* https://*; frame-ancestors 'none'; img-src 'self' data: blob: https:; script-src https://cdn.shopify.com https://cdn.shopifycdn.net https://checkout.shopifycs.com https://api.stripe.com https://mpsnare.iesnare.com https://appcenter.intuit.com https://www.paypal.com https://js.braintreegateway.com https://c.paypal.com https://maps.googleapis.com https://www.google-analytics.com https://v.shopify.com 'self' 'unsafe-inline' 'unsafe-eval'; upgrade-insecure-requests; report-uri /csp-report?source%5Baction%5D=index&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fmetafields&source%5Bsection%5D=admin_api&source%5Buuid%5D=07cba641-599d-4efa-904c-051f29b6e0f0"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"1; mode=block; report=/xss-report?source%5Baction%5D=index&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fmetafields&source%5Bsection%5D=admin_api&source%5Buuid%5D=07cba641-599d-4efa-904c-051f29b6e0f0"},{"key":"X-Request-ID","value":"07cba641-599d-4efa-904c-051f29b6e0f0"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=HvrwQbRtAGPSQPVqLurE8p3RavJN%2FNOIZwDaBwIFcriyy0mhHBmzEfjrBTpU7c%2BwqlMfCmHsqzunKggyNjhaQLHW7Cs0JPVn6QbWLYreZBI605Xog%2BSc%2FOIzew%2F92Cl238ilVlSUWEo%3D\"}],\"group\":\"cf-nel\",\"max_age\":604800}"},{"key":"NEL","value":"{\"success_fraction\":0.01,\"report_to\":\"cf-nel\",\"max_age\":604800}"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"83a5d5c52bc5a3a9-TPE"},{"key":"Content-Encoding","value":"br"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"metafields\": [\n        {\n            \"id\": 20965480202283,\n            \"namespace\": \"akohub\",\n            \"key\": \"points\",\n            \"value\": \"100\",\n            \"description\": null,\n            \"owner_id\": 6223356756011,\n            \"created_at\": \"2023-04-17T23:32:36-04:00\",\n            \"updated_at\": \"2024-02-20T01:51:44-05:00\",\n            \"owner_resource\": \"customer\",\n            \"type\": \"single_line_text_field\",\n            \"admin_graphql_api_id\": \"gid://shopify/Metafield/20965480202283\"\n        },\n        {\n            \"id\": 20966842499115,\n            \"namespace\": \"akohub\",\n            \"key\": \"tier\",\n            \"value\": \"Bronze\",\n            \"description\": null,\n            \"owner_id\": 6223356756011,\n            \"created_at\": \"2023-04-18T06:15:44-04:00\",\n            \"updated_at\": \"2024-01-28T23:59:21-05:00\",\n            \"owner_resource\": \"customer\",\n            \"type\": \"single_line_text_field\",\n            \"admin_graphql_api_id\": \"gid://shopify/Metafield/20966842499115\"\n        },\n        {\n            \"id\": 21201380900907,\n            \"namespace\": \"akohub\",\n            \"key\": \"birthday\",\n            \"value\": \"1992-09-11\",\n            \"description\": null,\n            \"owner_id\": 6223356756011,\n            \"created_at\": \"2023-06-20T05:04:13-04:00\",\n            \"updated_at\": \"2023-10-30T22:27:36-04:00\",\n            \"owner_resource\": \"customer\",\n            \"type\": \"single_line_text_field\",\n            \"admin_graphql_api_id\": \"gid://shopify/Metafield/21201380900907\"\n        },\n        {\n            \"id\": 21201380933675,\n            \"namespace\": \"akohub\",\n            \"key\": \"gender\",\n            \"value\": \"Man\",\n            \"description\": null,\n            \"owner_id\": 6223356756011,\n            \"created_at\": \"2023-06-20T05:04:13-04:00\",\n            \"updated_at\": \"2023-06-20T05:04:13-04:00\",\n            \"owner_resource\": \"customer\",\n            \"type\": \"single_line_text_field\",\n            \"admin_graphql_api_id\": \"gid://shopify/Metafield/21201380933675\"\n        },\n        {\n            \"id\": 23305719644203,\n            \"namespace\": \"akohub\",\n            \"key\": \"referralCode\",\n            \"value\": \"qduLGThznByA\",\n            \"description\": null,\n            \"owner_id\": 6223356756011,\n            \"created_at\": \"2024-01-26T03:27:20-05:00\",\n            \"updated_at\": \"2024-01-26T03:27:20-05:00\",\n            \"owner_resource\": \"customer\",\n            \"type\": \"string\",\n            \"admin_graphql_api_id\": \"gid://shopify/Metafield/23305719644203\"\n        }\n    ]\n}"}],"_postman_id":"d2448684-84b5-400a-9f29-056ef02149e0"}],"id":"7f393e5d-ccef-457b-9359-d94433a119d0","description":"<h3 id=\"prerequisites\"><strong>Prerequisites</strong></h3>\n<p>The <a href=\"https://apps.shopify.com/ako-retargeting\">Ako Marketing app</a> must be installed on your Shopify store.</p>\n<h3 id=\"overview\"><strong>Overview</strong></h3>\n<p>The points balance, VIP tier, birthday, gender and referralCode of a customer are recorded in metafields. Some parsing is necessary because these values are stored as single-line text in Shopify.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Points</td>\n<td>The balance of available points of a customer. The format is float.  <br />  <br />If the loyalty program is not enabled, <code>null</code> will be returned.</td>\n</tr>\n<tr>\n<td>VIP tier</td>\n<td>The VIP tier names are defined in the app by the merchant. For all the possible values, please refer to the merchant.  <br />  <br />If the VIP program is not enabled, <code>null</code> will be returned.</td>\n</tr>\n<tr>\n<td>Birthday</td>\n<td>The date is recorded in the format <code>YYYY-MM-DD</code>.  <br />  <br />If the customer has not entered the birthday information, <code>null</code> will be returned.</td>\n</tr>\n<tr>\n<td>Gender</td>\n<td>Possible values are <code>woman</code>, <code>man</code>,<code>transgender</code>, <code>nonBinary</code>, <code>preferNoResponse</code>.  <br />  <br />If the customer has not entered the gender information, <code>null</code> will be returned.</td>\n</tr>\n<tr>\n<td>Referral Code</td>\n<td>The referral code generated by this customer</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"7f393e5d-ccef-457b-9359-d94433a119d0"},{"name":"Get points and checkout redemption settings","item":[{"name":"GraphQL","id":"9f6e860e-ca5a-47a8-894c-50d269bb4878","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Shopify-Access-Token","value":"{{shopify-app-token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query {\n  shop {\n    id\n    myshopifyDomain\n    name\n    metafield(namespace: \"akohub\", key: \"checkout-redemption\") {\n      key\n      value\n    }\n  }\n}","variables":""}},"url":"https://{{shopify-store}}/admin/api/{{shopify-api-version}}/graphql.json","urlObject":{"protocol":"https","path":["admin","api","{{shopify-api-version}}","graphql.json"],"host":["{{shopify-store}}"],"query":[],"variable":[]}},"response":[{"id":"cfec5946-23ee-42b2-a31d-b7b523e5c8ea","name":"Success","originalRequest":{"method":"POST","header":[{"key":"X-Shopify-Access-Token","value":"{{shopify-app-token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query {\n  shop {\n    id\n    myshopifyDomain\n    name\n    metafield(namespace: \"akohub\", key: \"checkout-redemption\") {\n      key\n      value\n    }\n  }\n}","variables":""}},"url":"https://{{shopify-store}}/admin/api/{{shopify-api-version}}/graphql.json"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Date","value":"Mon, 03 Nov 2025 06:06:03 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"x-sorting-hat-podid","value":"157"},{"key":"x-sorting-hat-shopid","value":"56251777182"},{"key":"vary","value":"Accept-Encoding"},{"key":"referrer-policy","value":"origin-when-cross-origin"},{"key":"x-frame-options","value":"DENY"},{"key":"x-shopid","value":"56251777182"},{"key":"x-shardid","value":"157"},{"key":"x-stats-userid","value":""},{"key":"x-stats-apiclientid","value":"1324983"},{"key":"x-stats-apipermissionid","value":"407167893662"},{"key":"x-shopify-api-version","value":"2025-10"},{"key":"content-language","value":"en"},{"key":"strict-transport-security","value":"max-age=7889238"},{"key":"x-request-id","value":"88151551-80b7-45a2-a332-85e3b71cc733-1762149963"},{"key":"server-timing","value":"processing;dur=50, verdict_flag_enabled;desc=\"count=14\";dur=3.67, graphql;desc=\"admin/query/other\", _y;desc=\"c53d020d-4a0d-4c74-82af-b03e353edbf4\", _s;desc=\"5c852602-be85-411e-9318-79639ae316c8\""},{"key":"content-security-policy","value":"default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://* shopify-pos://*; block-all-mixed-content; child-src 'self' https://* shopify-pos://*; connect-src 'self' wss://* https://*; frame-ancestors 'none'; img-src 'self' data: blob: https:; script-src https://cdn.shopify.com https://cdn.shopifycdn.net https://checkout.pci.shopifyinc.com https://checkout.pci.shopifyinc.com/build/75a428d/card_fields.js https://api.stripe.com https://mpsnare.iesnare.com https://appcenter.intuit.com https://www.paypal.com https://js.braintreegateway.com https://c.paypal.com https://maps.googleapis.com https://www.google-analytics.com https://v.shopify.com 'self' 'unsafe-inline' 'unsafe-eval'; upgrade-insecure-requests; report-uri /csp-report?source%5Baction%5D=query&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fgraphql&source%5Bsection%5D=admin_api&source%5Buuid%5D=88151551-80b7-45a2-a332-85e3b71cc733-1762149963; report-to shopify-csp"},{"key":"x-content-type-options","value":"nosniff"},{"key":"x-download-options","value":"noopen"},{"key":"x-permitted-cross-domain-policies","value":"none"},{"key":"x-xss-protection","value":"1; mode=block"},{"key":"reporting-endpoints","value":"shopify-csp=\"/csp-report?source%5Baction%5D=query&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fgraphql&source%5Bsection%5D=admin_api&source%5Buuid%5D=88151551-80b7-45a2-a332-85e3b71cc733-1762149963\""},{"key":"x-dc","value":"gcp-us-east1,gcp-us-east1,gcp-us-east1"},{"key":"content-encoding","value":"gzip"},{"key":"Alt-Svc","value":"h3=\":443\"; ma=86400"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=VvkZ0IPAGHPFD%2FdHiLj5pC6D2MleplFQ0Ea9TRErCnQwv4KCdwgzFWx91N0XyMQj%2FgUxw10BGmS9XVNgPg4EtyMlOKitR78jsMiAMtRNfEoCdtqu3yddQDFHmY2kOdmOOnljac4en71F2mTi%2BKqF9mM%3D\"}],\"group\":\"cf-nel\",\"max_age\":604800}"},{"key":"NEL","value":"{\"success_fraction\":0.01,\"report_to\":\"cf-nel\",\"max_age\":604800}"},{"key":"Server-Timing","value":"cfRequestDuration;dur=98.999977"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"9989aef559f5aa23-IAD"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"shop\": {\n            \"id\": \"gid://shopify/Shop/56251777182\",\n            \"myshopifyDomain\": \"salt-and-sugar-tw.myshopify.com\",\n            \"name\": \"Salt & Sugar \",\n            \"metafield\": {\n                \"key\": \"checkout-redemption\",\n                \"value\": \"{\\\"shop\\\":{\\\"moneyFormat\\\":\\\"${{amount}}\\\",\\\"isMultiPassEnabled\\\":false,\\\"enabledPlatforms\\\":[\\\"line\\\",\\\"google\\\",\\\"instagram\\\",\\\"facebook\\\"],\\\"features\\\":[\\\"Discount\\\",\\\"DisableRedemptionForProducts\\\",\\\"JudgeMe\\\",\\\"TieredDiscount\\\",\\\"AnalyzeCartSubtotalSelector\\\",\\\"KlaviyoEvent\\\",\\\"AIMarketing\\\",\\\"ProductRedemptionRestrictions\\\",\\\"SHOP_DASHBOARD\\\",\\\"LoyaltyVIP\\\",\\\"ManualRedemption\\\",\\\"Retargeting\\\",\\\"Google\\\",\\\"Multipass\\\",\\\"StoreCredit\\\",\\\"SocialLogin\\\",\\\"CheckoutReward\\\",\\\"CheckoutRedemption\\\",\\\"EmailCampaign\\\",\\\"AnalyzeDrawerSubtotalSelector\\\",\\\"POS\\\",\\\"Referral\\\",\\\"Instagram\\\",\\\"Loyalty\\\"],\\\"cdnHostName\\\":\\\"https://tags.akohub.com\\\",\\\"hostName\\\":\\\"https://app.akohub.com\\\",\\\"appProxyPath\\\":\\\"/apps/akohub/\\\",\\\"currency\\\":\\\"USD\\\",\\\"timezone\\\":\\\"America/New_York\\\",\\\"accountVersion\\\":\\\"new_customer_accounts\\\"},\\\"pointsSetting\\\":{\\\"pointName\\\":{\\\"singular\\\":\\\"Point\\\",\\\"plural\\\":\\\"Points\\\"},\\\"discountLimit\\\":{\\\"percentage\\\":\\\"30\\\",\\\"type\\\":\\\"percentage\\\"},\\\"title\\\":\\\"Salt & Sugars\\\",\\\"pointBackRate\\\":null,\\\"pointRedeemRate\\\":{\\\"points\\\":\\\"100\\\",\\\"cashBack\\\":\\\"1\\\"},\\\"enabled\\\":true,\\\"redemptionTitle\\\":\\\"redeem points:\\\",\\\"redeemThreshold\\\":100,\\\"decimalPlaces\\\":0},\\\"walletSetting\\\":{\\\"enabled\\\":false,\\\"redemptionTitle\\\":\\\"redeem points:\\\",\\\"redeemThreshold\\\":0,\\\"decimalPlaces\\\":0},\\\"vipSetting\\\":{\\\"enabled\\\":true,\\\"vips\\\":[{\\\"perks\\\":[],\\\"rewards\\\":[{\\\"pointsExpiry\\\":3,\\\"rewardValue\\\":100,\\\"rewardType\\\":\\\"points\\\",\\\"title\\\":\\\"Points reward\\\",\\\"enabled\\\":true,\\\"id\\\":\\\"MI0VwBMUojqTJwNrOPQsR\\\",\\\"icon\\\":{\\\"alt\\\":\\\"point icon\\\",\\\"url\\\":\\\"https://akohub-images.s3.amazonaws.com/point.svg\\\"}},{\\\"title\\\":\\\"Store credit\\\",\\\"enabled\\\":true,\\\"id\\\":\\\"OmJJd2m6NYnoTkQEfTzmI\\\",\\\"rewardValue\\\":10,\\\"icon\\\":{\\\"alt\\\":\\\"Store credit\\\",\\\"url\\\":\\\"https://akohub-images.s3.us-east-1.amazonaws.com/store-credit-icon.svg\\\"},\\\"rewardType\\\":\\\"storeCredit\\\"}],\\\"checkoutReward\\\":null,\\\"entries\\\":{\\\"amount\\\":0},\\\"icon\\\":{\\\"alt\\\":\\\"blue medal\\\",\\\"url\\\":\\\"https://akohub-images.s3.amazonaws.com/blue-medal.svg\\\"},\\\"id\\\":\\\"8dc636351fbb4ed69255fa399591a151\\\",\\\"isStarter\\\":true,\\\"tag\\\":\\\"ako-starter\\\",\\\"tierLevel\\\":10028,\\\"name\\\":\\\"Starter\\\"},{\\\"perks\\\":[\\\"special product!\\\"],\\\"keepEntries\\\":{\\\"amount\\\":3000},\\\"rewards\\\":[{\\\"pointsExpiry\\\":1,\\\"rewardValue\\\":{\\\"title\\\":\\\"2Amount off order\\\",\\\"minimumRequirement\\\":{},\\\"usageLimit\\\":1,\\\"customerGets\\\":{\\\"percentage\\\":\\\"0.30\\\"},\\\"combinesWith\\\":{\\\"orderDiscounts\\\":true,\\\"shippingDiscounts\\\":true,\\\"productDiscounts\\\":true},\\\"discountType\\\":\\\"amountOffOrder\\\"},\\\"rewardType\\\":\\\"discountCode\\\",\\\"title\\\":\\\"2Amount off order\\\",\\\"enabled\\\":true,\\\"id\\\":\\\"qscMWpBC3QOH1JBjcWadL\\\",\\\"icon\\\":{\\\"alt\\\":\\\"amount off order discount\\\",\\\"url\\\":\\\"https://akohub-images.s3.amazonaws.com/discount.svg\\\"}}],\\\"checkoutReward\\\":{\\\"value\\\":0.15,\\\"title\\\":\\\"Gold Member 15% off\\\",\\\"type\\\":\\\"amountOffOrder\\\",\\\"discountType\\\":\\\"percentage\\\"},\\\"icon\\\":{\\\"alt\\\":\\\"gold medal\\\",\\\"url\\\":\\\"https://akohub-images.s3.amazonaws.com/gold-medal.svg\\\"},\\\"id\\\":\\\"10c3af13528c4e2b8a0dabff1fc425fd\\\",\\\"tag\\\":\\\"ako-gold\\\",\\\"entries\\\":{\\\"amount\\\":3000},\\\"tierLevel\\\":20080,\\\"name\\\":\\\"Gold\\\"},{\\\"perks\\\":[],\\\"rewards\\\":[{\\\"title\\\":\\\"Store credit\\\",\\\"enabled\\\":true,\\\"id\\\":\\\"0h8rnLRcvX9ipgqX6wQ65\\\",\\\"rewardValue\\\":30,\\\"icon\\\":{\\\"alt\\\":\\\"Store credit\\\",\\\"url\\\":\\\"https://akohub-images.s3.us-east-1.amazonaws.com/store-credit-icon.svg\\\"},\\\"rewardType\\\":\\\"storeCredit\\\"}],\\\"checkoutReward\\\":{\\\"value\\\":0.25,\\\"title\\\":\\\"Platinum Member 25% off\\\",\\\"type\\\":\\\"amountOffOrder\\\",\\\"discountType\\\":\\\"percentage\\\"},\\\"icon\\\":{\\\"alt\\\":\\\"platium medal\\\",\\\"url\\\":\\\"https://akohub-images.s3.amazonaws.com/platinum-medal.svg\\\"},\\\"id\\\":\\\"6a8f0345164347d69fcb663a16f37758\\\",\\\"tag\\\":\\\"ako-platinum\\\",\\\"entries\\\":{\\\"amount\\\":6000},\\\"tierLevel\\\":30044,\\\"name\\\":\\\"Platinum\\\"},{\\\"perks\\\":[\\\"Birthday Gift, Exclusive Offers and Coupons, Gift Set Worth 25K, Time Bound Sales, Early Access to Sales, \\\"],\\\"keepEntries\\\":{\\\"amount\\\":50000},\\\"rewards\\\":[{\\\"pointsExpiry\\\":1,\\\"rewardValue\\\":{\\\"title\\\":\\\"Free shipping 1\\\",\\\"minimumRequirement\\\":{},\\\"usageLimit\\\":1,\\\"combinesWith\\\":{\\\"orderDiscounts\\\":true,\\\"productDiscounts\\\":true},\\\"discountType\\\":\\\"freeShipping\\\"},\\\"rewardType\\\":\\\"discountCode\\\",\\\"title\\\":\\\"Free shipping 1\\\",\\\"enabled\\\":true,\\\"id\\\":\\\"TxhZXQXO2R9n3ui2gllra\\\",\\\"icon\\\":{\\\"alt\\\":\\\"free shipping discount\\\",\\\"url\\\":\\\"https://akohub-images.s3.amazonaws.com/free-shipping-discount.svg\\\"}},{\\\"pointsExpiry\\\":1,\\\"rewardValue\\\":{\\\"title\\\":\\\"Free shipping 2\\\",\\\"minimumRequirement\\\":{},\\\"usageLimit\\\":1,\\\"combinesWith\\\":{\\\"orderDiscounts\\\":true,\\\"productDiscounts\\\":true},\\\"discountType\\\":\\\"freeShipping\\\"},\\\"rewardType\\\":\\\"discountCode\\\",\\\"title\\\":\\\"Free shipping 2\\\",\\\"enabled\\\":true,\\\"id\\\":\\\"A60Z7fCEbAUVDkSAop8Is\\\",\\\"icon\\\":{\\\"alt\\\":\\\"free shipping discount\\\",\\\"url\\\":\\\"https://akohub-images.s3.amazonaws.com/free-shipping-discount.svg\\\"}},{\\\"pointsExpiry\\\":1,\\\"rewardValue\\\":{\\\"title\\\":\\\"Free shipping 3\\\",\\\"minimumRequirement\\\":{},\\\"usageLimit\\\":1,\\\"combinesWith\\\":{\\\"orderDiscounts\\\":true,\\\"productDiscounts\\\":true},\\\"discountType\\\":\\\"freeShipping\\\"},\\\"rewardType\\\":\\\"discountCode\\\",\\\"title\\\":\\\"Free shipping 3\\\",\\\"enabled\\\":true,\\\"id\\\":\\\"AsFjw4gYKgbBv1yEo7Cvo\\\",\\\"icon\\\":{\\\"alt\\\":\\\"free shipping discount\\\",\\\"url\\\":\\\"https://akohub-images.s3.amazonaws.com/free-shipping-discount.svg\\\"}},{\\\"pointsExpiry\\\":1,\\\"rewardValue\\\":{\\\"title\\\":\\\"Free shipping 4\\\",\\\"minimumRequirement\\\":{},\\\"usageLimit\\\":1,\\\"combinesWith\\\":{\\\"orderDiscounts\\\":true,\\\"productDiscounts\\\":true},\\\"discountType\\\":\\\"freeShipping\\\"},\\\"rewardType\\\":\\\"discountCode\\\",\\\"title\\\":\\\"Free shipping 4\\\",\\\"enabled\\\":true,\\\"id\\\":\\\"giPq1SInOQlQzvgipdXTK\\\",\\\"icon\\\":{\\\"alt\\\":\\\"free shipping discount\\\",\\\"url\\\":\\\"https://akohub-images.s3.amazonaws.com/free-shipping-discount.svg\\\"}},{\\\"pointsExpiry\\\":1,\\\"rewardValue\\\":{\\\"title\\\":\\\"Free shipping 5\\\",\\\"minimumRequirement\\\":{},\\\"usageLimit\\\":1,\\\"combinesWith\\\":{\\\"orderDiscounts\\\":true,\\\"productDiscounts\\\":true},\\\"discountType\\\":\\\"freeShipping\\\"},\\\"rewardType\\\":\\\"discountCode\\\",\\\"title\\\":\\\"Free shipping 5\\\",\\\"enabled\\\":true,\\\"id\\\":\\\"i_6RFF2_JZpqkQaarOYtV\\\",\\\"icon\\\":{\\\"alt\\\":\\\"free shipping discount\\\",\\\"url\\\":\\\"https://akohub-images.s3.amazonaws.com/free-shipping-discount.svg\\\"}}],\\\"checkoutReward\\\":null,\\\"icon\\\":{\\\"alt\\\":\\\"silver medal\\\",\\\"url\\\":\\\"https://akohub-images.s3.amazonaws.com/silver-medal.svg\\\"},\\\"id\\\":\\\"f95668b448e9446291ec37f8243bcc3d\\\",\\\"tag\\\":\\\"ako-silver\\\",\\\"entries\\\":{\\\"amount\\\":50000},\\\"tierLevel\\\":40062,\\\"name\\\":\\\"Platinum Lux\\\"},{\\\"perks\\\":[],\\\"rewards\\\":[],\\\"checkoutReward\\\":null,\\\"id\\\":\\\"GjoduTHmtzNnnvoUxDSPG\\\",\\\"icon\\\":{\\\"alt\\\":\\\"blue medal\\\",\\\"url\\\":\\\"https://akohub-images.s3.amazonaws.com/blue-medal.svg\\\"},\\\"tag\\\":\\\"ako-black\\\",\\\"tierLevel\\\":50003,\\\"name\\\":\\\"Black\\\"}],\\\"expire\\\":12,\\\"entries\\\":[\\\"amount\\\"],\\\"isRenewalEnabled\\\":true},\\\"referralSetting\\\":{\\\"referredCustomerCreateBefore\\\":30,\\\"shopName\\\":\\\"Salt & Sugar \\\",\\\"referralMessage\\\":\\\"Join me at {{shopName}}! Sign up and use my referral code {{referralCode}} to get {{rewardCollection}}! {{redirectLink}}\\\",\\\"socialShare\\\":{\\\"line\\\":true,\\\"twitter\\\":true,\\\"faceBook\\\":true,\\\"email\\\":true},\\\"enabled\\\":false,\\\"revokedRewardMethod\\\":\\\"full\\\",\\\"referralLink\\\":\\\"https://salt-and-sugar-tw.myshopify.com\\\",\\\"issueDelay\\\":{\\\"afterDays\\\":0,\\\"type\\\":\\\"afterPaid\\\"}},\\\"storeCreditSetting\\\":{\\\"enabled\\\":true,\\\"name\\\":{\\\"singular\\\":\\\"Store credit\\\",\\\"plural\\\":\\\"Store credits\\\"},\\\"decimalPlaces\\\":2},\\\"ui\\\":{\\\"isRewardEnabled\\\":true,\\\"showPointDiscount\\\":false,\\\"widgetAppearance\\\":{\\\"triggerButton\\\":{\\\"type\\\":\\\"iconWithText\\\",\\\"position\\\":\\\"bottomRight\\\",\\\"text\\\":\\\"Loyalty Program\\\",\\\"textColor\\\":\\\"#fdf1b4ff\\\",\\\"icon\\\":\\\"https://akohub-images.s3.amazonaws.com/icon-gift.svg\\\",\\\"textRotation\\\":\\\"default\\\",\\\"offset\\\":{\\\"x\\\":0,\\\"y\\\":0,\\\"bottom\\\":0,\\\"top\\\":0},\\\"backgroundColor\\\":\\\"#714d22ff\\\"},\\\"color\\\":{\\\"primaryColor\\\":\\\"#714d22ff\\\",\\\"headingTextColor\\\":\\\"#161514ff\\\",\\\"bodyTextColor\\\":\\\"#635442ff\\\"}},\\\"gender\\\":{\\\"transgender\\\":true,\\\"nonBinary\\\":true,\\\"man\\\":true,\\\"woman\\\":true,\\\"other\\\":true},\\\"popupSettings\\\":{\\\"openOnCustomerVisit\\\":true,\\\"openOnCustomerLogin\\\":true,\\\"openOnThankyouPage\\\":false},\\\"selectors\\\":{\\\"subtotal\\\":\\\".totals__total-value\\\",\\\"pointDiscount\\\":null},\\\"customStyleSheet\\\":\\\"\\\",\\\"showSocialLoginAtAccountPage\\\":false,\\\"applyAnywhere\\\":true,\\\"applyAllPages\\\":false,\\\"isBirthdayNotEditable\\\":false,\\\"showWidget\\\":true,\\\"cachedVersion\\\":\\\"1762095519394\\\",\\\"socialLoginWidget\\\":{},\\\"pointRedemption\\\":{\\\"selectors\\\":{\\\"container\\\":null,\\\"drawer\\\":{\\\"cartTotalPrice\\\":\\\"#CartDrawer .totals__total-value\\\",\\\"container\\\":\\\"#CartDrawer .drawer__footer\\\"},\\\"cartTotalPrice\\\":null,\\\"cart\\\":{\\\"cartTotalPrice\\\":\\\"\\\",\\\"container\\\":\\\"\\\"}},\\\"display\\\":{\\\"drawer\\\":true,\\\"cart\\\":true},\\\"flags\\\":{\\\"showPointRedemptionInAllPages\\\":false}}}}\"\n            }\n        }\n    },\n    \"extensions\": {\n        \"cost\": {\n            \"requestedQueryCost\": 2,\n            \"actualQueryCost\": 2,\n            \"throttleStatus\": {\n                \"maximumAvailable\": 2000,\n                \"currentlyAvailable\": 1998,\n                \"restoreRate\": 100\n            }\n        }\n    }\n}"}],"_postman_id":"9f6e860e-ca5a-47a8-894c-50d269bb4878"},{"name":"REST","id":"1b04b621-1bf1-49e2-85ff-634ecb7c2163","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-Shopify-Access-Token"},{"key":"value","value":"{{shopify-app-token}}"}]},"isInherited":false},"method":"GET","header":[{"key":"X-Shopify-Access-Token","value":"{{shopify-app-token}}","type":"text"}],"url":"https://{{shopify-store}}/admin/api/{{shopify-api-version}}/metafields.json?namespace=akohub&key=checkout-redemption","urlObject":{"protocol":"https","path":["admin","api","{{shopify-api-version}}","metafields.json"],"host":["{{shopify-store}}"],"query":[{"key":"namespace","value":"akohub"},{"key":"key","value":"checkout-redemption"}],"variable":[]}},"response":[],"_postman_id":"1b04b621-1bf1-49e2-85ff-634ecb7c2163"}],"id":"3bf63ca9-9713-4cd1-b494-edf4f0487013","description":"<h3 id=\"prerequisites\"><strong>Prerequisites</strong></h3>\n<p>The <a href=\"https://apps.shopify.com/ako-retargeting\">Ako Marketing app</a> must be installed on your Shopify store.</p>\n<h3 id=\"overview\"><strong>Overview</strong></h3>\n<p>The points and checkout redemption settings can be accessed through the <strong>Shop metafields</strong> with <strong>namespace</strong> <code>akohub</code> and the <strong>key</strong> <code>checkout-redemption</code>. The data parsing is necessary because these values are stored as single-line text in Shopify.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th><strong>Name</strong></th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>pointsSetting.title</td>\n<td>Program name</td>\n<td>The loyalty program name for displaying on the customer account page and widget.  <br />Ex: <code>\"Salt &amp; Sugars\"</code></td>\n</tr>\n<tr>\n<td>pointsSetting.pointName</td>\n<td>Point currency name</td>\n<td>The name or label used to represent points for singular and plural expressions.  <br />Ex: <code>{ \"singular\": \"Point\", \"plural\": \"Points\" }</code></td>\n</tr>\n<tr>\n<td>pointsSetting.pointRedeemRate</td>\n<td>Points redemption value</td>\n<td>Conversion rate when redeeming points.  <br />Ex: <code>{ \"points\": \"100\", \"cashBack\": \"1\" }</code> means customers redeem $1 with 100 points</td>\n</tr>\n<tr>\n<td>pointsSetting.discountLimit</td>\n<td>Maximum redeem amount</td>\n<td>The amount limit when redeeming points.  <br />Ex: <code>{ \"percentage\": \"30\", \"type\": \"percentage\" }</code> means points discount value can be used up to 30% of the total amount of the order</td>\n</tr>\n<tr>\n<td>pointsSetting.redeemThreshold</td>\n<td>Minimum purchase amount</td>\n<td>The minimum order amount limit when redeeming points.  <br />Ex: <code>100</code> means customers have to spent at least 100 USD to use points discount if the store currency is USD.</td>\n</tr>\n<tr>\n<td>pointsSetting.enabled</td>\n<td>Point program status</td>\n<td>The point program status that is managed by merchants. The point reward and point redemption are available only when <code>pointsSetting.enabled</code> is <code>true</code>.</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"3bf63ca9-9713-4cd1-b494-edf4f0487013"},{"name":"Redeem points on orders","item":[],"id":"93a9cddd-236d-448e-8f5b-6e63dac5a652","description":"<h3 id=\"prerequisites\"><strong>Prerequisites</strong></h3>\n<p>The <a href=\"https://apps.shopify.com/ako-retargeting\">Ako Marketing app</a> must be installed on your Shopify store.</p>\n<h3 id=\"overview\"><strong>Overview</strong></h3>\n<p>To create a Shopify order with the point redemption, you need to append a custom discount code to the <code>discountCode</code> of the order. The discount code format should be: <strong><code>redeem points: {{points}} ({{amount}} {{currencyCode}})</code></strong></p>\n<p>For example, if you'd like to redeem $10 USD with 100 points, please append the discount code <code>redeem points: 100 (10 USD)</code> while creating a new order.</p>\n<p>Learn more: <a href=\"https://shopify.dev/docs/api/admin-graphql/latest/mutations/ordercreate#arguments-order.fields.discountCode.itemFixedDiscountCode\">https://shopify.dev/docs/api/admin-graphql/latest/mutations/ordercreate#arguments-order.fields.discountCode.itemFixedDiscountCode</a></p>\n","_postman_id":"93a9cddd-236d-448e-8f5b-6e63dac5a652"},{"name":"Public API","item":[{"name":"Authentication","id":"7361abea-d7df-473c-89a4-8ec561110885","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"grantType\": \"client_credentials\",\n  \"clientId\": \"<CLIENT_ID>\",\n  \"clientSecret\": \"<CLIENT_SECRECT>\",\n  \"shop\": \"shopname.myshopify.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://app.akohub.com/api/public/v1/oauth/token","urlObject":{"protocol":"https","path":["api","public","v1","oauth","token"],"host":["app","akohub","com"],"query":[],"variable":[]}},"response":[{"id":"0fdca0f4-b7e6-4fa1-ac49-58a36c765853","name":"Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"grantType\": \"client_credentials\",\n  \"clientId\": \"e1230bc78de3ec291d1235\",\n  \"clientSecret\": \"e578ds12cabfdcfe076899c47b555664213d576bebf88af0a6a\",\n  \"shop\": \"shopname.myshopify.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://app.akohub.com/api/public/v1/oauth/token"},"status":"OK","code":200,"_postman_previewlanguage":"","header":[],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n  \"accessToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6InJlYWRfY3VzdG9tZXJzIHdyaXRlX2N1c3RvbWVycyIsInNob3AiOiJzYWx0LWFuZC1zdWdhci10dy5teXNob3BpZnkuY29tIiwibmFtZSI6Ikp1biBEZXYiLCJpYXQiOjE3NjM3MDgyMzksImV4cCI6MTc2MzcxMTgzOSwiYXVkIjoicHVibGljLWFwaSIsImlzcyI6Imh0dHBzOi8vYXBwLmFrb2h1Yi5jb20iLCJzdWIiOiJhMGQwOTE1Zjk3YTY2Y2Y1YTcyODE4ZjNhOWIwODc2YiJ9.GxB_OscFitWUoJBmUuH3uvvhD_9WipRFXyvTq_Llmto\",\n  \"tokenType\": \"Bearer\",\n  \"expiresIn\": 3600\n}"},{"id":"1ecb2c4c-2cd9-4c7c-a3e2-1a51cae6ee16","name":"Failed","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"grantType\": \"client_credentials\",\n  \"clientId\": \"e1230bc78de3ecASD\",\n  \"clientSecret\": \"e578ds12cabfdcfe076899c47b5556642DASD\",\n  \"shop\": \"shopname.myshopify.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://app.akohub.com/api/public/v1/oauth/token"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"","header":[],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n  \"code\": \"INVALID_CLIENT\",\n  \"message\": \"Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method.\",\n  \"details\": {},\n  \"requestId\": \"KQIZfR8rpsRiUWVZTpIKW\"\n}"}],"_postman_id":"7361abea-d7df-473c-89a4-8ec561110885"},{"name":"Adjust customer points","id":"55d118f7-808c-4693-af6a-ce0f805702d0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"customerId\": \"gid://shopify/Customer/6750363582621\",\n  \"customerEmail\": \"demo4@gmail.com\",\n  \"points\": 100,\n  \"subType\": \"REWARD_GRANT\",\n  \"expiryDate\": \"2025-12-01\",\n  \"reason\": \"Reward for completing a purchase\",\n  \"note\": \"You have earned 100 points for your recent purchase. These points will expire on December 1, 2025.\",\n  \"idempotencyKey\": \"#ORDER_001\",\n  \"metadata\": {}\n}","options":{"raw":{"language":"json"}}},"url":"https://app.akohub.com/api/public/v1/customers/points/adjust","description":"<p>This endpoint allows you to manually add or remove points from a customer's balance. You can identify the customer using either their <code>customerId</code> or <code>customerEmail</code>.</p>\n<p>When you adjust points, you can provide a reason for the adjustment, set an expiration date for any points being added, and include an idempotency key to prevent accidental duplicate transactions. If a customer is not yet part of the loyalty program, they will be automatically enrolled when you make the first points adjustment.</p>\n<hr />\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customerId</code></td>\n<td>string or number</td>\n<td>One of (either this or `customerEmail`)</td>\n<td>The Shopify customer ID. Can be provided as a string (e.g., \"gid://shopify/Customer/123\") or number (e.g., 123).</td>\n</tr>\n<tr>\n<td><code>customerEmail</code></td>\n<td>string</td>\n<td>One of (either this or `customeIdl`)</td>\n<td>The email address for the customer. You must provide either <code>customerId</code> or <code>customerEmail</code>.</td>\n</tr>\n<tr>\n<td><code>points</code></td>\n<td>number</td>\n<td>Yes</td>\n<td>The number of points to adjust. Use a positive value to add points and a negative value to subtract them.</td>\n</tr>\n<tr>\n<td><code>subType</code></td>\n<td>string</td>\n<td>No</td>\n<td>The type of point transaction. Defaults to <code>MANUAL_ADJUSTMENT</code>.  <br />  <br /><strong>Allowed values:</strong>  <br />- <code>MANUAL_ADJUSTMENT</code>: A manual adjustment made by an administrator.  <br />- <code>REWARD_GRANT</code>: Granting a reward to the customer.  <br />- <code>REWARD_REVOKE</code>: Revoking a previously granted reward.  <br />- <code>REDEMPTION_SPEND</code>: Deducting points for a redemption.  <br />- <code>REDEMPTION_REFUND</code>: Refunding points from a previous redemption.  <br />- <code>POINTS_EXPIRE</code>: Deducting points that have expired.</td>\n</tr>\n<tr>\n<td><code>expiryDate</code></td>\n<td>string</td>\n<td>No</td>\n<td>The expiration date for the points being added, in <code>YYYY-MM-DD</code> format. The time will be set to the end of the day in the shop's timezone. If not provided, points may not expire depending on shop settings.</td>\n</tr>\n<tr>\n<td><code>reason</code></td>\n<td>string</td>\n<td>No</td>\n<td>A brief, internal-facing reason for the points adjustment (e.g., \"Manual correction for support ticket #123\").</td>\n</tr>\n<tr>\n<td><code>note</code></td>\n<td>string</td>\n<td>No</td>\n<td>A public-facing note that may be displayed to the customer in their points history.</td>\n</tr>\n<tr>\n<td><code>idempotencyKey</code></td>\n<td>string</td>\n<td>No</td>\n<td>A unique key to ensure the operation is performed only once. If you send the same request with the same key multiple times, only the first one will be processed. Recommended for safe retries.</td>\n</tr>\n<tr>\n<td><code>metadata</code></td>\n<td>object</td>\n<td>No</td>\n<td>Additional custom data to attach to the transaction.</td>\n</tr>\n<tr>\n<td><code>allowNegativeBalance</code></td>\n<td>boolean</td>\n<td>No</td>\n<td></td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["api","public","v1","customers","points","adjust"],"host":["app","akohub","com"],"query":[],"variable":[]}},"response":[{"id":"88191066-60ae-42ef-9477-b358e087c37c","name":"Success","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"customerId\": \"gid://shopify/Customer/6750363582621\",\n  \"customerEmail\": \"demo4@gmail.com\",\n  \"points\": 100,\n  \"subType\": \"REWARD_GRANT\",\n  \"expiryDate\": \"2025-12-01\",\n  \"reason\": \"Reward for completing a purchase\",\n  \"note\": \"You have earned 100 points for your recent purchase. These points will expire on December 1, 2025.\",\n  \"idempotencyKey\": \"#ORDER_001\"\n}","options":{"raw":{"language":"json"}}},"url":"https://app.akohub.com/api/public/v1/customers/points/adjust"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n  \"uniqueId\": 34847478,\n  \"pointsAdjusted\": 100,\n  \"previousBalance\": 150,\n  \"currentBalance\": 250,\n  \"expiryDate\": \"2025-12-01T05:00:00.000Z\",\n  \"customerId\": 6750363582621,\n  \"customerEmail\": \"demo4@gmail.com\",\n  \"idempotencyKey\": \"#ORDER_001\"\n}"},{"id":"0d961fc5-f9b0-4b71-96f3-152a5a576b0c","name":"Success - Redemption Spend","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"customerId\": \"gid://shopify/Customer/6750363582621\",\n  \"customerEmail\": \"demo4@gmail.com\",\n  \"points\": -100,\n  \"subType\": \"REDEMPTION_SPEND\",\n  \"reason\": \"Points redeemed for order discount\",\n  \"note\": \"You have redeemed 100 points for a $10 discount on your order\",\n  \"idempotencyKey\": \"#ORDER_REDEEM_001\",\n  \"metadata\": {\n    \"orderId\": \"123456789\"\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://app.akohub.com/api/public/v1/customers/points/adjust"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","enabled":true}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n  \"uniqueId\": 34847479,\n  \"pointsAdjusted\": -100,\n  \"previousBalance\": 150,\n  \"currentBalance\": 50,\n  \"customerId\": 6750363582621,\n  \"customerEmail\": \"demo4@gmail.com\",\n  \"idempotencyKey\": \"#ORDER_REDEEM_001\"\n}"}],"_postman_id":"55d118f7-808c-4693-af6a-ce0f805702d0"},{"name":"Get customer","id":"edffb96d-78df-4644-a3e0-2a00d0cf172c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://app.akohub.com/api/public/v1/customers/:customerId","description":"<p>Bundled customer profile. Returns the base profile always; opt into per-feature blocks with\n<code>?fields=</code>. Designed to replace 5+ calls when painting a profile screen.</p>\n<ul>\n<li><strong>Scope:</strong> <code>read_customers</code> (base). Each requested field may add a scope.</li>\n<li><strong>Rate tier:</strong> read.</li>\n</ul>\n<p><strong>Path variable</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Variable</th>\n<th>Example</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customerId</code></td>\n<td><code>1234567890</code></td>\n<td>Numeric ID or Shopify GID.</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Query</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>fields</code></td>\n<td>CSV</td>\n<td>Any of <code>points</code>, <code>vip</code>, <code>storeCredit</code>, <code>referral</code>. Order/duplicates ignored. Omit for base only.</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Per-field scope expansion</strong> — <code>points</code> → none · <code>vip</code> → <code>read_vip</code> · <code>storeCredit</code> →\n<code>read_store_credit</code> · <code>referral</code> → <code>read_referrals</code>. A field requested without its scope fails\n<code>403 FORBIDDEN</code> (never silently dropped). On any block failure the whole request fails — no partial\nresponses.</p>\n<p><strong>Errors:</strong> <code>400 INVALID_REQUEST</code> (unknown field) · <code>403 FORBIDDEN</code> (missing scope) ·\n<code>403 PROGRAM_DISABLED</code> (feature off) · <code>404 RESOURCE_NOT_FOUND</code> (customer missing, or <code>referral</code>\nwith no code yet) · <code>422 UNPROCESSABLE_ENTITY</code> (<code>storeCredit</code> but shop lacks Shopify\n<code>read_store_credit_accounts</code>).</p>\n","urlObject":{"protocol":"https","path":["api","public","v1","customers",":customerId"],"host":["app","akohub","com"],"query":[],"variable":[{"type":"any","value":"","key":"customerId"}]}},"response":[{"id":"1a72ff5d-6834-45e1-aa85-94257ae80659","name":"Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"url":"https://app.akohub.com/api/public/v1/customers/1234567890"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n  \"customerId\": \"1234567890\",\n  \"customerGid\": \"gid://shopify/Customer/1234567890\",\n  \"email\": \"alex@example.com\",\n  \"firstName\": \"Alex\",\n  \"lastName\": \"Robin\",\n  \"createdAt\": \"2025-01-15T03:12:00.000Z\",\n  \"updatedAt\": \"2026-04-15T11:00:00.000Z\",\n  \"birthday\": \"1990-04-17\",\n  \"gender\": \"female\",\n  \"phone\": \"+15551234567\"\n}"},{"id":"85c820ab-e7d7-42e1-aa19-288762008a6d","name":"Success - all blocks","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"https://app.akohub.com/api/public/v1/customers/1234567890?fields=points,vip,storeCredit,referral","protocol":"https","host":["app","akohub","com"],"path":["api","public","v1","customers","1234567890"],"query":[{"key":"fields","value":"points,vip,storeCredit,referral"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","enabled":true}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n  \"customerId\": \"1234567890\",\n  \"customerGid\": \"gid://shopify/Customer/1234567890\",\n  \"email\": \"alex@example.com\",\n  \"firstName\": \"Alex\",\n  \"lastName\": \"Robin\",\n  \"createdAt\": \"2025-01-15T03:12:00.000Z\",\n  \"updatedAt\": \"2026-04-15T11:00:00.000Z\",\n  \"birthday\": \"1990-04-17\",\n  \"gender\": \"female\",\n  \"phone\": \"+15551234567\",\n  \"points\": {\n    \"balance\": \"1500\",\n    \"expirations\": [\n      { \"points\": \"300\", \"expiryDate\": \"2026-05-01T00:00:00.000Z\" }\n    ]\n  },\n  \"vip\": {\n    \"currentTier\": { \"tierLevel\": 2, \"tierName\": \"Gold\" },\n    \"tierExpiryDate\": \"2027-01-01T00:00:00.000Z\",\n    \"progress\": {\n      \"earnedPoints\": \"1500\",\n      \"orderAmountSpent\": \"450.00\",\n      \"orderCount\": 6,\n      \"currency\": \"USD\"\n    }\n  },\n  \"storeCredit\": { \"accounts\": [{ \"balance\": \"25.00\", \"currency\": \"USD\" }] },\n  \"referral\": {\n    \"code\": \"aB3kXm9qRp\",\n    \"totalReferred\": 7,\n    \"createdAt\": \"2026-04-17T08:00:00.000Z\"\n  }\n}"}],"_postman_id":"edffb96d-78df-4644-a3e0-2a00d0cf172c"},{"name":"List customers","id":"87185b7c-47cf-439f-8405-b8e1878fca7a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://app.akohub.com/api/public/v1/customers","description":"<p>Paginated list of customers for incremental sync. Items use a slim shape — only fields available\nwithout a per-customer Shopify call. Use the dedicated per-resource endpoints for live or\nfeature-specific data.</p>\n<ul>\n<li><strong>Scope:</strong> <code>read_customers</code> (plus <code>read_vip</code> when filtering by <code>vipTierLevel</code>). <strong>Rate tier:</strong> read.</li>\n</ul>\n<p><strong>Query</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>email</code></td>\n<td>string</td>\n<td>Exact match. Short-circuits to a single-item page (or <code>data: []</code>); other params ignored.</td>\n</tr>\n<tr>\n<td><code>updatedAfter</code></td>\n<td>ISO 8601</td>\n<td>Incremental-sync cursor by <code>updatedAt</code>. Default when omitted is epoch.</td>\n</tr>\n<tr>\n<td><code>vipTierLevel</code></td>\n<td>integer</td>\n<td>Filter by VIP tier (requires <code>read_vip</code>). <strong>Post-fetch</strong> — pages may be short; page until <code>next</code> is null.</td>\n</tr>\n<tr>\n<td><code>size</code></td>\n<td>integer</td>\n<td>Default 20, max 100.</td>\n</tr>\n<tr>\n<td><code>nextPaging</code></td>\n<td>string</td>\n<td>Opaque cursor from <code>paging.next</code>.</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n<p><code>birthday</code> / <code>gender</code> / <code>phone</code> are omitted when absent. <code>points.balance</code> is the <strong>cached</strong> balance\n(can briefly lag the ledger — call <code>Get customer</code> / the points endpoint for the authoritative\nvalue). <code>vip</code> is omitted without <code>read_vip</code> or when VIP is off. <code>storeCredit</code> and <code>referral</code> are\nnever in the list. A points change reaches this endpoint's <code>updatedAt</code> asynchronously, so run a\nperiodic full reconciliation rather than treating <code>updatedAfter</code> as exhaustive.</p>\n</blockquote>\n<p><strong>Errors:</strong> <code>400 INVALID_REQUEST</code> (bad query) · <code>403 FORBIDDEN</code> (<code>vipTierLevel</code> without <code>read_vip</code>).</p>\n","urlObject":{"protocol":"https","path":["api","public","v1","customers"],"host":["app","akohub","com"],"query":[],"variable":[]}},"response":[{"id":"49fc6eda-fdf8-41f9-b2b0-89ff343593ea","name":"Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"url":{"raw":"https://app.akohub.com/api/public/v1/customers?updatedAfter=2026-04-01T00:00:00.000Z&size=20","protocol":"https","host":["app","akohub","com"],"path":["api","public","v1","customers"],"query":[{"key":"updatedAfter","value":"2026-04-01T00:00:00.000Z"},{"key":"size","value":"20"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n  \"paging\": { \"next\": \"eyJ...\" },\n  \"data\": [\n    {\n      \"customerId\": \"1234567890\",\n      \"customerGid\": \"gid://shopify/Customer/1234567890\",\n      \"email\": \"alex@example.com\",\n      \"firstName\": \"Alex\",\n      \"lastName\": \"Robin\",\n      \"birthday\": \"1990-04-17\",\n      \"gender\": \"man\",\n      \"phone\": \"+15551234567\",\n      \"points\": { \"balance\": \"250\" },\n      \"vip\": { \"tierLevel\": 2, \"tierName\": \"Gold\" },\n      \"createdAt\": \"2025-01-15T03:12:00.000Z\",\n      \"updatedAt\": \"2026-04-15T11:00:00.000Z\"\n    }\n  ]\n}"},{"id":"b084b4e0-306d-42b0-babb-d1f41ee73e76","name":"Success - by email","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"url":{"raw":"https://app.akohub.com/api/public/v1/customers?email=alex@example.com","protocol":"https","host":["app","akohub","com"],"path":["api","public","v1","customers"],"query":[{"key":"email","value":"alex@example.com"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","enabled":true}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n  \"paging\": { \"next\": null },\n  \"data\": [\n    {\n      \"customerId\": \"1234567890\",\n      \"customerGid\": \"gid://shopify/Customer/1234567890\",\n      \"email\": \"alex@example.com\",\n      \"firstName\": \"Alex\",\n      \"lastName\": \"Robin\",\n      \"points\": { \"balance\": \"250\" },\n      \"createdAt\": \"2025-01-15T03:12:00.000Z\",\n      \"updatedAt\": \"2026-04-15T11:00:00.000Z\"\n    }\n  ]\n}"}],"_postman_id":"87185b7c-47cf-439f-8405-b8e1878fca7a"},{"name":"Update customer profile","id":"d7f84d27-446d-4d1a-bc47-8dad3df43d16","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n  \"customerId\": \"gid://shopify/Customer/6750363582621\",\n  \"customerEmail\": \"demo4@gmail.com\",\n  \"points\": 100,\n  \"subType\": \"REWARD_GRANT\",\n  \"expiryDate\": \"2025-12-01\",\n  \"reason\": \"Reward for completing a purchase\",\n  \"note\": \"You have earned 100 points for your recent purchase. These points will expire on December 1, 2025.\",\n  \"idempotencyKey\": \"#ORDER_001\",\n  \"metadata\": {}\n}","options":{"raw":{"language":"json"}}},"url":"https://app.akohub.com/api/public/v1/customers/:customerId/profile","description":"<p>Partial update of a customer's editable profile fields. Wraps the same internal profile syncer as<br />the storefront widget — propagating to Shopify, Klaviyo, and the loyalty record, and firing the<br /><code>updateCustomerProfile</code> event (which drives the complete-profile reward and an asynchronous VIP<br />recalculation). Updating <code>birthday</code> also re-schedules the birthday reward.</p>\n<ul>\n<li><p><strong>Scope:</strong> <code>write_customers</code>. <strong>Rate tier:</strong> write.</p>\n</li>\n<li><p>Identified by path <code>customerId</code> only. No <code>idempotencyKey</code> (a PATCH to fixed values is naturally<br />  idempotent).</p>\n</li>\n</ul>\n<p><strong>Body</strong> (all optional; at least one required)</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>firstName</code> / <code>lastName</code></td>\n<td>string</td>\n<td>Customer name.</td>\n</tr>\n<tr>\n<td><code>birthday</code></td>\n<td>string</td>\n<td>Strict <code>YYYY-MM-DD</code>. Bad shape / impossible date → <code>400</code> (before any Shopify call). A genuine edit lock → <code>422</code>. <strong>400 = fix the format, 422 = locked/rejected.</strong></td>\n</tr>\n<tr>\n<td><code>gender</code></td>\n<td>string</td>\n<td>Free-form; not an enum.</td>\n</tr>\n<tr>\n<td><code>phone</code></td>\n<td>string</td>\n<td>E.164 recommended; validated by Shopify.</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n<p>Only supplied fields change. <strong>Empty / omitted values are no-ops — a field cannot be cleared****through this endpoint.</strong> The response is the same base envelope as <code>Get customer</code>, so you can<br />render \"saved just now\" with no follow-up read. </p>\n</blockquote>\n<blockquote>\n<p><strong>Birthday lock (<strong><strong><code>422</code></strong></strong>).</strong> This only happens when the merchant has enabled <strong>\"birthday****non-editable after saving\"</strong> in their Customer Profile settings <strong>and</strong> the customer already has<br />a birthday. Setting a birthday for the first time always succeeds; only <em>changing</em> an existing<br />one is rejected. With the setting off (the default), birthday is freely editable. The lock exists<br />to stop customers gaming birthday rewards by repeatedly changing their birth date. </p>\n</blockquote>\n<p><strong>Errors:</strong> <code>400 INVALID_REQUEST</code> (no recognized field / wrong type / bad <code>birthday</code>) ·<br /><code>403 FORBIDDEN</code> (missing <code>write_customers</code>) · <code>404 RESOURCE_NOT_FOUND</code> · <code>422 UNPROCESSABLE_ENTITY</code><br />(birthday locked, or Shopify rejected a field — <code>details.fields</code> maps field → message) ·<br /><code>500 UNKNOWN_ERROR</code> (transient Shopify sync failure; DynamoDB change not committed — retry).</p>\n","urlObject":{"protocol":"https","path":["api","public","v1","customers",":customerId","profile"],"host":["app","akohub","com"],"query":[],"variable":[{"type":"any","value":"","key":"customerId"}]}},"response":[{"id":"92760c8e-fd9a-4fbd-894a-d129ae31554a","name":"Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"firstName\": \"Alex\",\n  \"lastName\": \"Robin\",\n  \"birthday\": \"1990-04-17\",\n  \"gender\": \"female\",\n  \"phone\": \"+15551234567\"\n}","options":{"raw":{"language":"json"}}},"url":"https://app.akohub.com/api/public/v1/customers/1234567890/profile"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n  \"customerId\": \"1234567890\",\n  \"customerGid\": \"gid://shopify/Customer/1234567890\",\n  \"email\": \"alex@example.com\",\n  \"firstName\": \"Alex\",\n  \"lastName\": \"Robin\",\n  \"birthday\": \"1990-04-17\",\n  \"gender\": \"female\",\n  \"phone\": \"+15551234567\",\n  \"createdAt\": \"2025-01-15T03:12:00.000Z\",\n  \"updatedAt\": \"2026-06-25T08:00:00.000Z\"\n}"},{"id":"c98feba5-d1cf-44a9-b044-2591282cb339","name":"Failed - birthday locked","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"firstName\": \"Alex\",\n  \"lastName\": \"Robin\",\n  \"birthday\": \"1990-04-17\",\n  \"gender\": \"female\",\n  \"phone\": \"+15551234567\"\n}","options":{"raw":{"language":"json"}}},"url":"https://app.akohub.com/api/public/v1/customers/1234567890/profile"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","enabled":true}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n  \"code\": \"UNPROCESSABLE_ENTITY\",\n  \"message\": \"Birthday cannot be edited\",\n  \"details\": {\n    \"fields\": { \"birthday\": \"Birthday is locked and cannot be changed\" }\n  }\n}"}],"_postman_id":"d7f84d27-446d-4d1a-bc47-8dad3df43d16"},{"name":"Get customer vip qualifying orders","id":"56b02b37-5b59-4a8f-bc69-4761ff27ce55","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n  \"customerId\": \"gid://shopify/Customer/6750363582621\",\n  \"customerEmail\": \"demo4@gmail.com\",\n  \"points\": 100,\n  \"subType\": \"REWARD_GRANT\",\n  \"expiryDate\": \"2025-12-01\",\n  \"reason\": \"Reward for completing a purchase\",\n  \"note\": \"You have earned 100 points for your recent purchase. These points will expire on December 1, 2025.\",\n  \"idempotencyKey\": \"#ORDER_001\",\n  \"metadata\": {}\n}","options":{"raw":{"language":"json"}}},"url":"https://app.akohub.com/api/public/v1/customers/:customerId/vip/qualifying-orders","description":"<p>Per-order breakdown of the spend that counts toward VIP tier qualification inside the shop's\nrolling window, plus the date each order rolls out of it. Reads the same ledger the tier engine\nqualifies on, so the total here matches <code>GET /customers/{customerId}/vip</code> →\n<code>progress.orderAmountSpent</code> (default <code>qualification</code> window). Exists so partners can build a\n\"spend N more before &lt;date&gt; to reach/keep &lt;tier&gt;\" reminder — something the aggregate alone\ncan't express, because the qualification total drifts downward day by day as old orders age out.</p>\n<ul>\n<li><p><strong>Scope:</strong> <code>read_vip</code>. <strong>Rate tier:</strong> read.</p>\n</li>\n<li><p>Identified by path <code>customerId</code> only (numeric or Customer GID). No query params — unlike\n<code>GET /customers/{customerId}/vip</code>, this endpoint always describes the qualification window.</p>\n</li>\n<li><p><strong>No pagination:</strong> <code>orders</code> returns the complete in-window set in one response, because the\nroll-out math needs all of it. Typical customers return single digits to a few dozen rows;\na heavy repeat buyer on a high-frequency store can return several hundred. There is no hard\ncap — size your client accordingly rather than assuming a small array.</p>\n</li>\n</ul>\n<p><strong>Response</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customerId</code> / <code>customerGid</code></td>\n<td>string</td>\n<td>Echoed identifiers (numeric string + GID).</td>\n</tr>\n<tr>\n<td><code>window</code></td>\n<td>object</td>\n<td>The rolling qualification window — see below.</td>\n</tr>\n<tr>\n<td><code>orderAmountSpent</code></td>\n<td>decimal string</td>\n<td>Total countable spend inside the window, in <code>currency</code>.</td>\n</tr>\n<tr>\n<td><code>currency</code></td>\n<td>string</td>\n<td>Shop currency (ISO 4217).</td>\n</tr>\n<tr>\n<td><code>orders</code></td>\n<td>array</td>\n<td>Ascending by <code>createdAt</code> (oldest first), so <code>orders[0]</code> is the next to roll out.</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong><code>window</code></strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>startsAt</code></td>\n<td>string | null</td>\n<td><code>max(CalculationDate, endsAt − Expire months)</code>. <code>null</code> means unbounded (lifetime VIP with no CalculationDate set).</td>\n</tr>\n<tr>\n<td><code>endsAt</code></td>\n<td>string</td>\n<td><code>now − calculationDelayDays</code>.</td>\n</tr>\n<tr>\n<td><code>calculationPeriodDays</code></td>\n<td>number | null</td>\n<td>Expire months × 30 — same value as <code>GET /vip/tiers</code>. <code>null</code> for lifetime.</td>\n</tr>\n<tr>\n<td><code>calculationDelayDays</code></td>\n<td>number</td>\n<td>Maturity delay in days; the window ends this far before now.</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong><code>orders[]</code></strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>orderId</code></td>\n<td>string</td>\n<td>Shopify order id — the join key to your own order data.</td>\n</tr>\n<tr>\n<td><code>createdAt</code></td>\n<td>string</td>\n<td>Ledger time of the order's earliest qualifying entry — what the window is measured against, <strong>not necessarily the Shopify order date</strong>.</td>\n</tr>\n<tr>\n<td><code>amountSpent</code></td>\n<td>decimal string</td>\n<td>The <strong>net countable amount from our ledger</strong>: after refunds, product-only per the shop's OrderTotal rule, plus manual adjustments. This is what the tier engine counts, <strong>not</strong> Shopify's order total.</td>\n</tr>\n<tr>\n<td><code>expiryDate</code></td>\n<td>string | null</td>\n<td>When the order rolls out of the window (<code>createdAt</code> + Expire months + CalculationDelay days). <code>null</code> for lifetime VIP.</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n<p><strong>Building an \"upgrade-by\" reminder.</strong> Pick a deadline — typically <code>orders[0].expiryDate</code>, the\nnext roll-out. The still-valid total at that deadline = <code>orderAmountSpent</code> − the <code>amountSpent</code> of\nevery order whose <code>expiryDate ≤ deadline</code>. The shortfall = the next tier's\n<code>criteria.amountSpent.value</code> (from <code>GET /vip/tiers</code>) − that still-valid total. Which roll-out to\nremind before is your policy; the API just gives you every date.</p>\n</blockquote>\n<blockquote>\n<p><strong>Lifetime VIP (**</strong><code>Expire</code> = lifetime*<strong>*) returns no rows.</strong> There is no rolling window — the\nlower bound is fixed, so orders never roll out and a per-order reminder has nothing to say. You get\n<code>calculationPeriodDays: null</code>, <code>orders: []</code>, and an <code>orderAmountSpent</code> counted from the fixed lower\nbound. <code>startsAt</code> is <code>null</code> only when the shop set no CalculationDate (then the total is all-time);\notherwise it is that date. Derive the (static) shortfall from <code>orderAmountSpent</code> vs the tier\nthreshold.</p>\n</blockquote>\n<blockquote>\n<p><strong><code>orderAmountSpent</code> can exceed the sum of <code>orders[]</code>.</strong> A manual spend adjustment made without an\norder counts toward the total but has no <code>orders</code> row. Reconcile against <code>orderAmountSpent</code>, never\nagainst your own sum of the rows.</p>\n</blockquote>\n<blockquote>\n<p><strong>Freshness.</strong> These rows are live ledger reads, while <code>currentTier</code> on <code>GET /customers/{id}/vip</code>\nis a cached snapshot updated by an async recalculation. Right after a qualifying order the totals\nhere can already clear the next threshold while the tier still reads low — that's \"pending recalc\",\nnot a mismatch.</p>\n</blockquote>\n<p><strong>Errors:</strong> <code>400 INVALID_REQUEST</code> (<code>customerId</code> is neither numeric nor a Customer GID) ·\n<code>403 FORBIDDEN</code> (missing <code>read_vip</code>) · <code>403 PROGRAM_DISABLED</code> (VIP is not enabled for this shop) ·\n<code>404 RESOURCE_NOT_FOUND</code> (no such customer on this shop).</p>\n","urlObject":{"protocol":"https","path":["api","public","v1","customers",":customerId","vip","qualifying-orders"],"host":["app","akohub","com"],"query":[],"variable":[{"type":"any","value":"","key":"customerId"}]}},"response":[{"id":"136a327b-b6a3-45c6-825a-9770a0ac0cf8","name":"Rolling window — 12-month Expire","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"firstName\": \"Alex\",\n  \"lastName\": \"Robin\",\n  \"birthday\": \"1990-04-17\",\n  \"gender\": \"female\",\n  \"phone\": \"+15551234567\"\n}","options":{"raw":{"language":"json"}}},"url":"https://app.akohub.com/api/public/v1/customers/1234567890/vip/qualifying-orders"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n  \"customerId\": \"1234567890\",\n  \"customerGid\": \"gid://shopify/Customer/1234567890\",\n  \"window\": {\n    \"startsAt\": \"2025-07-29T06:12:44.000Z\",\n    \"endsAt\": \"2026-07-29T06:12:44.000Z\",\n    \"calculationPeriodDays\": 360,\n    \"calculationDelayDays\": 0\n  },\n  \"orderAmountSpent\": \"7900.00\",\n  \"currency\": \"TWD\",\n  \"orders\": [\n    {\n      \"orderId\": \"5921472118871\",\n      \"createdAt\": \"2025-08-12T02:11:07.000Z\",\n      \"amountSpent\": \"1280.00\",\n      \"expiryDate\": \"2026-08-12T02:11:07.000Z\"\n    },\n    {\n      \"orderId\": \"5934017659471\",\n      \"createdAt\": \"2025-11-24T09:40:33.000Z\",\n      \"amountSpent\": \"2450.00\",\n      \"expiryDate\": \"2026-11-24T09:40:33.000Z\"\n    },\n    {\n      \"orderId\": \"6011238490193\",\n      \"createdAt\": \"2026-03-08T14:02:19.000Z\",\n      \"amountSpent\": \"990.00\",\n      \"expiryDate\": \"2027-03-08T14:02:19.000Z\"\n    },\n    {\n      \"orderId\": \"6088350197841\",\n      \"createdAt\": \"2026-06-30T01:25:44.000Z\",\n      \"amountSpent\": \"3180.00\",\n      \"expiryDate\": \"2027-06-30T01:25:44.000Z\"\n    }\n  ]\n}"},{"id":"bacfd9b7-c198-41dd-9f16-dd7db731479c","name":"Maturity delay + unattributed spend","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"firstName\": \"Alex\",\n  \"lastName\": \"Robin\",\n  \"birthday\": \"1990-04-17\",\n  \"gender\": \"female\",\n  \"phone\": \"+15551234567\"\n}","options":{"raw":{"language":"json"}}},"url":"https://app.akohub.com/api/public/v1/customers/1234567890/vip/qualifying-orders"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n  \"customerId\": \"1234567890\",\n  \"customerGid\": \"gid://shopify/Customer/1234567890\",\n  \"window\": {\n    \"startsAt\": \"2025-07-22T06:12:44.000Z\",\n    \"endsAt\": \"2026-07-22T06:12:44.000Z\",\n    \"calculationPeriodDays\": 360,\n    \"calculationDelayDays\": 7\n  },\n  \"orderAmountSpent\": \"4230.00\",\n  \"currency\": \"TWD\",\n  \"orders\": [\n    {\n      \"orderId\": \"5921472118871\",\n      \"createdAt\": \"2025-08-12T02:11:07.000Z\",\n      \"amountSpent\": \"1280.00\",\n      \"expiryDate\": \"2026-08-19T02:11:07.000Z\"\n    },\n    {\n      \"orderId\": \"5934017659471\",\n      \"createdAt\": \"2025-11-24T09:40:33.000Z\",\n      \"amountSpent\": \"2450.00\",\n      \"expiryDate\": \"2026-12-01T09:40:33.000Z\"\n    }\n  ]\n}"},{"id":"f0051f6f-b703-4593-ad5f-303c28f24126","name":"No qualifying orders in the window","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"firstName\": \"Alex\",\n  \"lastName\": \"Robin\",\n  \"birthday\": \"1990-04-17\",\n  \"gender\": \"female\",\n  \"phone\": \"+15551234567\"\n}","options":{"raw":{"language":"json"}}},"url":"https://app.akohub.com/api/public/v1/customers/1234567890/vip/qualifying-orders"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n  \"customerId\": \"1234567890\",\n  \"customerGid\": \"gid://shopify/Customer/1234567890\",\n  \"window\": {\n    \"startsAt\": \"2025-07-29T06:12:44.000Z\",\n    \"endsAt\": \"2026-07-29T06:12:44.000Z\",\n    \"calculationPeriodDays\": 360,\n    \"calculationDelayDays\": 0\n  },\n  \"orderAmountSpent\": \"0.00\",\n  \"currency\": \"TWD\",\n  \"orders\": []\n}"},{"id":"669c3ba1-9134-4a5a-b651-fb8871108feb","name":"Malformed customerId","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"firstName\": \"Alex\",\n  \"lastName\": \"Robin\",\n  \"birthday\": \"1990-04-17\",\n  \"gender\": \"female\",\n  \"phone\": \"+15551234567\"\n}","options":{"raw":{"language":"json"}}},"url":"https://app.akohub.com/api/public/v1/customers/abc/vip/qualifying-orders"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n  \"code\": \"INVALID_REQUEST\",\n  \"message\": \"Invalid params parameters: customerId - customerId must be a numeric ID or a Shopify Customer GID\",\n  \"details\": {\n    \"source\": \"params\",\n    \"errors\": {\n      \"_errors\": [],\n      \"customerId\": {\n        \"_errors\": [\"customerId must be a numeric ID or a Shopify Customer GID\"]\n      }\n    }\n  },\n  \"requestId\": \"0f5b2c41-9f2a-4d18-9a3e-6c1b7e0d4a55\"\n}"},{"id":"f5447851-ab9d-4c54-a306-64b0a1ae6b2e","name":"Missing scope","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"firstName\": \"Alex\",\n  \"lastName\": \"Robin\",\n  \"birthday\": \"1990-04-17\",\n  \"gender\": \"female\",\n  \"phone\": \"+15551234567\"\n}","options":{"raw":{"language":"json"}}},"url":"https://app.akohub.com/api/public/v1/customers/abc/vip/qualifying-orders"},"status":"Forbidden","code":403,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n  \"code\": \"FORBIDDEN\",\n  \"message\": \"Insufficient scope. Requires all of: \\\"read_vip\\\".\",\n  \"details\": {},\n  \"requestId\": \"0f5b2c41-9f2a-4d18-9a3e-6c1b7e0d4a55\"\n}"}],"_postman_id":"56b02b37-5b59-4a8f-bc69-4761ff27ce55"}],"id":"1c0809c3-1a60-444b-9636-d2a69ce6e7b7","description":"<h3 id=\"prerequisites\"><strong>Prerequisites</strong></h3>\n<ol>\n<li><p>The <a href=\"https://apps.shopify.com/ako-retargeting\">Ako Marketing app</a> must be installed on your Shopify store.</p>\n</li>\n<li><p>Ako Marketing Authentication</p>\n</li>\n</ol>\n<h3 id=\"authentication\">Authentication</h3>\n<p>Ako Marketing API uses the <strong>OAuth 2.0 Client Credentials Grant</strong> flow to authenticate requests.</p>\n<p>To get started, you will need a <code>clientId</code> and a <code>clientSecret</code>. Please contact us to have these credentials created for you.</p>\n<p>The authentication process is as follows:</p>\n<ol>\n<li><p><strong>Request an Access Token</strong>: Your application makes a <code>POST</code> request to our OAuth token endpoint, providing your <code>clientId</code>, <code>clientSecret</code>, the <code>shop</code>, and the <code>grantType</code>.</p>\n</li>\n<li><p><strong>Receive the Access Token</strong>: If the credentials are valid, the API will return a short-lived JSON Web Token (JWT) as an <code>accessToken</code>. This token is specifically scoped to the requested shop.</p>\n</li>\n<li><p><strong>Call the API</strong>: Include this <code>accessToken</code> in the <code>Authorization</code> header of all subsequent API requests, using the <code>Bearer</code> scheme.</p>\n</li>\n</ol>\n<p>The access token expires in <strong>1 hour</strong>. Your application should be prepared to request a new token when the old one expires.</p>\n<p><strong>Conventions</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Item</th>\n<th>Rule</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Field casing</td>\n<td>Request and response bodies are <strong>camelCase</strong>.</td>\n</tr>\n<tr>\n<td>Customer ID</td>\n<td>Numeric (<code>\"123\"</code>) or Shopify GID. Responses always return both <code>customerId</code> and <code>customerGid</code>.</td>\n</tr>\n<tr>\n<td>Timestamps</td>\n<td>ISO 8601 UTC (<code>2026-04-17T08:00:00.000Z</code>).</td>\n</tr>\n<tr>\n<td>Money / points</td>\n<td>Decimal <strong>strings</strong> (<code>\"25.00\"</code>, <code>\"1500\"</code>) with <code>currency</code> for money. Counts and <code>tierLevel</code> stay numbers.</td>\n</tr>\n<tr>\n<td>Pagination</td>\n<td>Query <code>size</code> (default 20, max 100) + <code>nextPaging</code>. Response <code>{ paging: { next }, data: [...] }</code>.</td>\n</tr>\n<tr>\n<td>Rate limits</td>\n<td>Per (partner, shop), 60s window. Reads 600/min, writes 60/min. Over-limit → <code>429</code> with <code>Retry-After</code>.</td>\n</tr>\n<tr>\n<td>Errors</td>\n<td><code>{ code, message, details, requestId? }</code>. <code>code</code> is the machine-readable name; HTTP status conveys the class.</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Error codes:</strong> <code>INVALID_REQUEST</code> (400) · <code>INVALID_TOKEN</code> (401) · <code>FORBIDDEN</code> (403, scope) ·<br /><code>PROGRAM_DISABLED</code> (403, feature off) · <code>RESOURCE_NOT_FOUND</code> (404) · <code>UNPROCESSABLE_ENTITY</code> (422) ·<br /><code>TOO_MANY_REQUESTS</code> (429) · <code>UNKNOWN_ERROR</code> (500).</p>\n<h3 id=\"overview\"><strong>Overview</strong></h3>\n<p>The <strong>Adjust customer points</strong> API allows you to add points to a customer's point balance or subtract points from a customer's point balance.</p>\n<p>You can specify points you'd like to add or subtract, the point expiry date, the public note, and internal note.</p>\n","_postman_id":"1c0809c3-1a60-444b-9636-d2a69ce6e7b7"},{"name":"Get social login user id of customer","item":[{"name":"GraphQL","id":"856da721-2c44-414c-9848-f9d9595fcd5e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Shopify-Access-Token","value":"{{shopify-app-token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query {\n  customer(id: \"gid://shopify/Customer/6511487451249\") {\n    tags\n  }\n}\n\n","variables":""}},"url":"https://{{shopify-store}}/admin/api/{{shopify-api-version}}/graphql.json","urlObject":{"protocol":"https","path":["admin","api","{{shopify-api-version}}","graphql.json"],"host":["{{shopify-store}}"],"query":[],"variable":[]}},"response":[{"id":"2956db9c-2952-43a5-8045-40c4b216d1ba","name":"Success","originalRequest":{"method":"POST","header":[{"key":"X-Shopify-Access-Token","value":"{{shopify-app-token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query {\n  customer(id: \"gid://shopify/Customer/6511487451249\") {\n    tags\n  }\n}\n\n","variables":""}},"url":"https://{{shopify-store}}/admin/api/{{shopify-api-version}}/graphql.json"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 25 Dec 2023 02:04:51 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Sorting-Hat-PodId","value":"112"},{"key":"X-Sorting-Hat-ShopId","value":"7648215153"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Referrer-Policy","value":"origin-when-cross-origin"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-ShopId","value":"7648215153"},{"key":"X-ShardId","value":"112"},{"key":"X-Stats-UserId","value":""},{"key":"X-Stats-ApiClientId","value":"6389563"},{"key":"X-Stats-ApiPermissionId","value":"356878549105"},{"key":"X-Shopify-API-Version","value":"2023-10"},{"key":"Content-Language","value":"en"},{"key":"Strict-Transport-Security","value":"max-age=7889238"},{"key":"Server-Timing","value":"processing;dur=79, graphql;desc=\"admin/query/other\""},{"key":"Server-Timing","value":"cfRequestDuration;dur=299.000025"},{"key":"X-Shopify-Stage","value":"production"},{"key":"Content-Security-Policy","value":"default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://* shopify-pos://*; block-all-mixed-content; child-src 'self' https://* shopify-pos://*; connect-src 'self' wss://* https://*; frame-ancestors 'none'; img-src 'self' data: blob: https:; script-src https://cdn.shopify.com https://cdn.shopifycdn.net https://checkout.shopifycs.com https://api.stripe.com https://mpsnare.iesnare.com https://appcenter.intuit.com https://www.paypal.com https://js.braintreegateway.com https://c.paypal.com https://maps.googleapis.com https://www.google-analytics.com https://v.shopify.com 'self' 'unsafe-inline' 'unsafe-eval'; upgrade-insecure-requests; report-uri /csp-report?source%5Baction%5D=query&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fgraphql&source%5Bsection%5D=admin_api&source%5Buuid%5D=832ca8e2-49dd-4eb7-bdad-cac4609be8db"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"1; mode=block; report=/xss-report?source%5Baction%5D=query&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fgraphql&source%5Bsection%5D=admin_api&source%5Buuid%5D=832ca8e2-49dd-4eb7-bdad-cac4609be8db"},{"key":"X-Request-ID","value":"832ca8e2-49dd-4eb7-bdad-cac4609be8db"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=ALUbzXpTdqopBrTSL2ze7uiSIIQ0WNQwoJ03iy2SybBf79FEmUbCZ%2B8FnucL7%2FYxP0%2Bo%2F%2F8PFyZA5ZVJ3bja2lxrVu9V31Qc7qJ3Evab3krjj2DLfQ0TyWaVqN2iSfS%2BRHVyCROcFYLk3doCWNcmJac%3D\"}],\"group\":\"cf-nel\",\"max_age\":604800}"},{"key":"NEL","value":"{\"success_fraction\":0.01,\"report_to\":\"cf-nel\",\"max_age\":604800}"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"83ad84024e174a6d-TPE"},{"key":"Content-Encoding","value":"br"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"customer\": {\n            \"tags\": [\n                \"ako-tier-1\"\n            ]\n        }\n    },\n    \"extensions\": {\n        \"cost\": {\n            \"requestedQueryCost\": 1,\n            \"actualQueryCost\": 1,\n            \"throttleStatus\": {\n                \"maximumAvailable\": 1000,\n                \"currentlyAvailable\": 999,\n                \"restoreRate\": 50\n            }\n        }\n    }\n}"}],"_postman_id":"856da721-2c44-414c-9848-f9d9595fcd5e"},{"name":"REST","id":"b51f6f12-0c44-495c-9c1f-0a3aaf0335b3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Shopify-Access-Token","value":"{{shopify-app-token}}","type":"text"}],"url":"https://{{shopify-store}}/admin/api/{{shopify-api-version}}/customers/6511487451249.json?fields=tags\n","urlObject":{"protocol":"https","path":["admin","api","{{shopify-api-version}}","customers","6511487451249.json"],"host":["{{shopify-store}}"],"query":[{"key":"fields","value":"tags\n"}],"variable":[]}},"response":[{"id":"b0a23aad-ab44-4351-b5e0-656b4093e375","name":"Success","originalRequest":{"method":"GET","header":[{"key":"X-Shopify-Access-Token","value":"{{shopify-app-token}}","type":"text"}],"url":{"raw":"https://{{shopify-store}}/admin/api/{{shopify-api-version}}/customers/6511487451249.json?fields=tags\n","protocol":"https","host":["{{shopify-store}}"],"path":["admin","api","{{shopify-api-version}}","customers","6511487451249.json"],"query":[{"key":"fields","value":"tags\n"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 25 Dec 2023 02:06:40 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Sorting-Hat-PodId","value":"112"},{"key":"X-Sorting-Hat-ShopId","value":"7648215153"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Referrer-Policy","value":"origin-when-cross-origin"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-ShopId","value":"7648215153"},{"key":"X-ShardId","value":"112"},{"key":"X-Stats-UserId","value":""},{"key":"X-Stats-ApiClientId","value":"6389563"},{"key":"X-Stats-ApiPermissionId","value":"356878549105"},{"key":"X-Shopify-API-Version","value":"2023-10"},{"key":"HTTP_X_SHOPIFY_SHOP_API_CALL_LIMIT","value":"1/40"},{"key":"X-Shopify-Shop-Api-Call-Limit","value":"1/40"},{"key":"Strict-Transport-Security","value":"max-age=7889238"},{"key":"Server-Timing","value":"processing;dur=36"},{"key":"Server-Timing","value":"cfRequestDuration;dur=244.999886"},{"key":"X-Shopify-Stage","value":"production"},{"key":"Content-Security-Policy","value":"default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://* shopify-pos://*; block-all-mixed-content; child-src 'self' https://* shopify-pos://*; connect-src 'self' wss://* https://*; frame-ancestors 'none'; img-src 'self' data: blob: https:; script-src https://cdn.shopify.com https://cdn.shopifycdn.net https://checkout.shopifycs.com https://api.stripe.com https://mpsnare.iesnare.com https://appcenter.intuit.com https://www.paypal.com https://js.braintreegateway.com https://c.paypal.com https://maps.googleapis.com https://www.google-analytics.com https://v.shopify.com 'self' 'unsafe-inline' 'unsafe-eval'; upgrade-insecure-requests; report-uri /csp-report?source%5Baction%5D=show&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fcustomers&source%5Bsection%5D=admin_api&source%5Buuid%5D=89e861b1-5c96-4a7a-b2b9-1ffb62c522d6"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"1; mode=block; report=/xss-report?source%5Baction%5D=show&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fcustomers&source%5Bsection%5D=admin_api&source%5Buuid%5D=89e861b1-5c96-4a7a-b2b9-1ffb62c522d6"},{"key":"X-Request-ID","value":"89e861b1-5c96-4a7a-b2b9-1ffb62c522d6"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=LYLee46AYEe5c31pI78kGzY%2B9ce2enCLF8p0LyPf0B5Is4jwDbM%2FQTEcvcuFH3xiycYv7yEhK3tzDKPfMev0VV6Su71RacXSVnm1uUQhy2QwBp3psE51H18o9toh5CDj0OW%2FsZiH%2BkfxTEqvi1szV7o%3D\"}],\"group\":\"cf-nel\",\"max_age\":604800}"},{"key":"NEL","value":"{\"success_fraction\":0.01,\"report_to\":\"cf-nel\",\"max_age\":604800}"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"83ad86af39c74a6d-TPE"},{"key":"Content-Encoding","value":"br"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"customer\": {\n        \"tags\": \"ako-tier-1\"\n    }\n}"}],"_postman_id":"b51f6f12-0c44-495c-9c1f-0a3aaf0335b3"}],"id":"919fd300-d6fa-45f6-8e95-46daf0c1d4ce","description":"<h3 id=\"prerequisites\"><strong>Prerequisites</strong></h3>\n<p>The <a href=\"https://apps.shopify.com/ako-retargeting\">Ako Marketing app</a> must be installed on your Shopify store.</p>\n<h3 id=\"overview\"><strong>Overview</strong></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>User Id</td>\n<td>uid__  <br />For examples:  <br />Line: uid_line_U4db7d9aa667d37d06ff4b65bec0fa390</td>\n</tr>\n<tr>\n<td>Platform</td>\n<td>You can create a segment for the line users  <br />  <br />ako_social_  <br />For examples:  <br />  <br />Line: ako_social_line</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"919fd300-d6fa-45f6-8e95-46daf0c1d4ce"},{"name":"Get referral link","item":[{"name":"[GraphQL] Get Referral Link Domain","id":"87cd7c00-af1a-4089-ae66-5bb6fcb2426f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Shopify-Access-Token","value":"{{shopify-app-token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query {\n    shop {\n        metafields(\n            keys: [\"akohub.referralLink\"]\n            first: 1\n        ) {\n            nodes {\n                value\n                key\n            }\n        }\n    }\n}","variables":""}},"url":"https://{{shopify-store}}/admin/api/{{shopify-api-version}}/graphql.json","urlObject":{"protocol":"https","path":["admin","api","{{shopify-api-version}}","graphql.json"],"host":["{{shopify-store}}"],"query":[],"variable":[]}},"response":[{"id":"742a055d-4b74-41ff-8c4b-adc7d609cb3f","name":"Success","originalRequest":{"method":"POST","header":[{"key":"X-Shopify-Access-Token","value":"{{shopify-app-token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query {\n    shop {\n        metafields(\n            keys: [\"akohub.referralLink\"]\n            first: 1\n        ) {\n            nodes {\n                value\n                key\n            }\n        }\n    }\n}","variables":""}},"url":"https://{{shopify-store}}/admin/api/{{shopify-api-version}}/graphql.json"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 27 Feb 2024 08:35:21 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Sorting-Hat-PodId","value":"42"},{"key":"X-Sorting-Hat-ShopId","value":"30020802"},{"key":"Vary","value":"Accept-Encoding"},{"key":"referrer-policy","value":"origin-when-cross-origin"},{"key":"x-frame-options","value":"DENY"},{"key":"x-shopid","value":"30020802"},{"key":"x-shardid","value":"42"},{"key":"x-stats-userid","value":""},{"key":"x-stats-apiclientid","value":"32023871489"},{"key":"x-stats-apipermissionid","value":"367959310379"},{"key":"x-shopify-api-version","value":"2024-01"},{"key":"content-language","value":"en"},{"key":"strict-transport-security","value":"max-age=7889238"},{"key":"server-timing","value":"processing;dur=80, graphql;desc=\"admin/query/other\""},{"key":"x-shopify-stage","value":"production"},{"key":"content-security-policy","value":"default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://* shopify-pos://*; block-all-mixed-content; child-src 'self' https://* shopify-pos://*; connect-src 'self' wss://* https://*; frame-ancestors 'none'; img-src 'self' data: blob: https:; script-src https://cdn.shopify.com https://cdn.shopifycdn.net https://checkout.shopifycs.com https://api.stripe.com https://mpsnare.iesnare.com https://appcenter.intuit.com https://www.paypal.com https://js.braintreegateway.com https://c.paypal.com https://maps.googleapis.com https://www.google-analytics.com https://v.shopify.com 'self' 'unsafe-inline' 'unsafe-eval'; upgrade-insecure-requests; report-uri /csp-report?source%5Baction%5D=query&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fgraphql&source%5Bsection%5D=admin_api&source%5Buuid%5D=67b00543-39cb-4eee-ae81-fac7d28fe970"},{"key":"x-content-type-options","value":"nosniff"},{"key":"x-download-options","value":"noopen"},{"key":"x-permitted-cross-domain-policies","value":"none"},{"key":"x-xss-protection","value":"1; mode=block; report=/xss-report?source%5Baction%5D=query&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fgraphql&source%5Bsection%5D=admin_api&source%5Buuid%5D=67b00543-39cb-4eee-ae81-fac7d28fe970"},{"key":"x-envoy-upstream-service-time","value":"83"},{"key":"X-Dc","value":"gcp-asia-east1,gcp-us-central1"},{"key":"X-Request-ID","value":"67b00543-39cb-4eee-ae81-fac7d28fe970"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=u%2FHyJWV9APhpA%2BctM95ERLbq7PjbjohFZbJx2F05tRec0zkpy3e1J%2Flfsv3SOYQAq%2FQ4g%2BHGHTGZKxpvc%2BT9GArG%2BB5%2B1wLabL3Vx1G4dBsev6Nz8%2FS7zyoy%2FZnYzXu03lHs64%2FnVJ%2Fu1zyJBZQ%3D\"}],\"group\":\"cf-nel\",\"max_age\":604800}"},{"key":"NEL","value":"{\"success_fraction\":0.01,\"report_to\":\"cf-nel\",\"max_age\":604800}"},{"key":"Server-Timing","value":"cfRequestDuration;dur=253.999949"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"85bf180ccb104a0f-TPE"},{"key":"Content-Encoding","value":"br"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"shop\": {\n            \"metafields\": {\n                \"nodes\": [\n                    {\n                        \"value\": \"https://glitzzie-party.myshopify.com\",\n                        \"key\": \"akohub.referralLink\"\n                    }\n                ]\n            }\n        }\n    },\n    \"extensions\": {\n        \"cost\": {\n            \"requestedQueryCost\": 4,\n            \"actualQueryCost\": 4,\n            \"throttleStatus\": {\n                \"maximumAvailable\": 2000,\n                \"currentlyAvailable\": 1996,\n                \"restoreRate\": 100\n            }\n        }\n    }\n}"}],"_postman_id":"87cd7c00-af1a-4089-ae66-5bb6fcb2426f"},{"name":"[REST] Get Referral Link Domain","id":"ec3663f6-210d-4cfe-9206-94eeb6796204","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Shopify-Access-Token","value":"{{shopify-app-token}}","type":"text"}],"url":"https://{{shopify-store}}/admin/api/{{shopify-api-version}}/metafields.json?namespace=akohub&key=referralLink","urlObject":{"protocol":"https","path":["admin","api","{{shopify-api-version}}","metafields.json"],"host":["{{shopify-store}}"],"query":[{"key":"namespace","value":"akohub"},{"key":"key","value":"referralLink"}],"variable":[]}},"response":[{"id":"f56375d0-fe1d-4ac9-9941-5cadf44fcc39","name":"Success","originalRequest":{"method":"GET","header":[{"key":"X-Shopify-Access-Token","value":"{{shopify-app-token}}","type":"text"}],"url":{"raw":"https://{{shopify-store}}/admin/api/{{shopify-api-version}}/metafields.json?namespace=akohub&key=referralLink","protocol":"https","host":["{{shopify-store}}"],"path":["admin","api","{{shopify-api-version}}","metafields.json"],"query":[{"key":"namespace","value":"akohub"},{"key":"key","value":"referralLink"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 27 Feb 2024 08:25:23 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Sorting-Hat-PodId","value":"42"},{"key":"X-Sorting-Hat-ShopId","value":"30020802"},{"key":"Vary","value":"Accept-Encoding"},{"key":"referrer-policy","value":"origin-when-cross-origin"},{"key":"x-frame-options","value":"DENY"},{"key":"x-shopid","value":"30020802"},{"key":"x-shardid","value":"42"},{"key":"x-stats-userid","value":""},{"key":"x-stats-apiclientid","value":"32023871489"},{"key":"x-stats-apipermissionid","value":"367959310379"},{"key":"x-shopify-api-version","value":"2024-01"},{"key":"http_x_shopify_shop_api_call_limit","value":"1/40"},{"key":"x-shopify-shop-api-call-limit","value":"1/40"},{"key":"strict-transport-security","value":"max-age=7889238"},{"key":"server-timing","value":"processing;dur=40"},{"key":"x-shopify-stage","value":"production"},{"key":"content-security-policy","value":"default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://* shopify-pos://*; block-all-mixed-content; child-src 'self' https://* shopify-pos://*; connect-src 'self' wss://* https://*; frame-ancestors 'none'; img-src 'self' data: blob: https:; script-src https://cdn.shopify.com https://cdn.shopifycdn.net https://checkout.shopifycs.com https://api.stripe.com https://mpsnare.iesnare.com https://appcenter.intuit.com https://www.paypal.com https://js.braintreegateway.com https://c.paypal.com https://maps.googleapis.com https://www.google-analytics.com https://v.shopify.com 'self' 'unsafe-inline' 'unsafe-eval'; upgrade-insecure-requests; report-uri /csp-report?source%5Baction%5D=index&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fmetafields&source%5Bsection%5D=admin_api&source%5Buuid%5D=13597921-fe69-4a64-a056-738b4f5d2c3c"},{"key":"x-content-type-options","value":"nosniff"},{"key":"x-download-options","value":"noopen"},{"key":"x-permitted-cross-domain-policies","value":"none"},{"key":"x-xss-protection","value":"1; mode=block; report=/xss-report?source%5Baction%5D=index&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fmetafields&source%5Bsection%5D=admin_api&source%5Buuid%5D=13597921-fe69-4a64-a056-738b4f5d2c3c"},{"key":"x-envoy-upstream-service-time","value":"42"},{"key":"X-Dc","value":"gcp-asia-east1,gcp-us-central1"},{"key":"X-Request-ID","value":"13597921-fe69-4a64-a056-738b4f5d2c3c"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=xXU6u2n7I%2B0p5iggCXWYM5DQ1c0SuOzQrO%2ByAtdj1HsO68M7Wtbuv%2Fq3d9pSWzsjXKYj4ZLYah1BNO7%2B%2Fq%2FH35zKIeknLz%2BecEmSJqsODEenN3yUthTzKe5O52m0Rc9QD8tA7E0G7hn%2Fe3m923A%3D\"}],\"group\":\"cf-nel\",\"max_age\":604800}"},{"key":"NEL","value":"{\"success_fraction\":0.01,\"report_to\":\"cf-nel\",\"max_age\":604800}"},{"key":"Server-Timing","value":"cfRequestDuration;dur=217.000008"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"85bf096f381e4a0f-TPE"},{"key":"Content-Encoding","value":"br"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"metafields\": [\n        {\n            \"id\": 23078621675563,\n            \"namespace\": \"akohub\",\n            \"key\": \"referralLink\",\n            \"value\": \"https://glitzzie-party.myshopify.com\",\n            \"description\": null,\n            \"owner_id\": 30020802,\n            \"created_at\": \"2024-01-16T03:56:40-05:00\",\n            \"updated_at\": \"2024-01-26T03:27:18-05:00\",\n            \"owner_resource\": \"shop\",\n            \"type\": \"string\",\n            \"admin_graphql_api_id\": \"gid://shopify/Metafield/23078621675563\"\n        }\n    ]\n}"}],"_postman_id":"ec3663f6-210d-4cfe-9206-94eeb6796204"}],"id":"b008e410-6ee4-43a4-8fad-e587980fbd50","description":"<h3 id=\"prerequisites\"><strong>Prerequisites</strong></h3>\n<p>The <a href=\"https://apps.shopify.com/ako-retargeting\">Ako Marketing app</a> must be installed on your Shopify store.</p>\n<h3 id=\"overview\"><strong>Overview</strong></h3>\n<p>The referral link is combined with the following 2 parts.</p>\n<ul>\n<li><p>Referral link domain (which can be fetched with shop's metafields)</p>\n</li>\n<li><p>Referral Code (<a href=\"https://developers.akohub.com/#7f393e5d-ccef-457b-9359-d94433a119d0\">which can be fetched with customer's metafields</a>)</p>\n</li>\n</ul>\n<p>The format of the referral link of a customer is like this:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{{Referral link domain}}?ref={{Referral Code}}\n\n</code></pre>","_postman_id":"b008e410-6ee4-43a4-8fad-e587980fbd50"},{"name":"Get order attributes relating to logistics and invoices","item":[{"name":"[GraphQL] Get attributes of an order","id":"d56954bd-61f7-4ca5-ab1f-9ed5400c1116","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Shopify-Access-Token","value":"{{shopify-app-token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query {\n    order(id: \"gid://shopify/Order/5489068441777\") {\n    id\n    name\n    customAttributes {\n        key\n        value\n    }\n  }\n}","variables":""}},"url":"https://{{shopify-store}}/admin/api/{{shopify-api-version}}/graphql.json","urlObject":{"protocol":"https","path":["admin","api","{{shopify-api-version}}","graphql.json"],"host":["{{shopify-store}}"],"query":[],"variable":[]}},"response":[{"id":"fb7df478-f2af-4dee-b4e3-fb4b0a5732d8","name":"Success","originalRequest":{"method":"POST","header":[{"key":"X-Shopify-Access-Token","value":"{{shopify-app-token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query {\n    order(id: \"gid://shopify/Order/5489068441777\") {\n    id\n    name\n    customAttributes {\n        key\n        value\n    }\n  }\n}","variables":""}},"url":"https://{{shopify-store}}/admin/api/{{shopify-api-version}}/graphql.json"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 28 Aug 2024 06:54:41 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"x-sorting-hat-podid","value":"176"},{"key":"x-sorting-hat-shopid","value":"59007467697"},{"key":"vary","value":"Accept-Encoding"},{"key":"referrer-policy","value":"origin-when-cross-origin"},{"key":"x-frame-options","value":"DENY"},{"key":"x-shopid","value":"59007467697"},{"key":"x-shardid","value":"176"},{"key":"x-stats-userid","value":""},{"key":"x-stats-apiclientid","value":"143749447681"},{"key":"x-stats-apipermissionid","value":"479776506033"},{"key":"x-shopify-api-version","value":"2024-01"},{"key":"content-language","value":"en"},{"key":"strict-transport-security","value":"max-age=7889238"},{"key":"x-request-id","value":"a506127f-a324-4048-9857-0b4e06870999-1724828081"},{"key":"server-timing","value":"processing;dur=69, graphql;desc=\"admin/query/other\""},{"key":"content-security-policy","value":"default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://* shopify-pos://*; block-all-mixed-content; child-src 'self' https://* shopify-pos://*; connect-src 'self' wss://* https://*; frame-ancestors 'none'; img-src 'self' data: blob: https:; script-src https://cdn.shopify.com https://cdn.shopifycdn.net https://checkout.shopifycs.com https://api.stripe.com https://mpsnare.iesnare.com https://appcenter.intuit.com https://www.paypal.com https://js.braintreegateway.com https://c.paypal.com https://maps.googleapis.com https://www.google-analytics.com https://v.shopify.com 'self' 'unsafe-inline' 'unsafe-eval'; upgrade-insecure-requests; report-uri /csp-report?source%5Baction%5D=query&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fgraphql&source%5Bsection%5D=admin_api&source%5Buuid%5D=a506127f-a324-4048-9857-0b4e06870999-1724828081"},{"key":"x-content-type-options","value":"nosniff"},{"key":"x-download-options","value":"noopen"},{"key":"x-permitted-cross-domain-policies","value":"none"},{"key":"x-xss-protection","value":"1; mode=block; report=/xss-report?source%5Baction%5D=query&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fgraphql&source%5Bsection%5D=admin_api&source%5Buuid%5D=a506127f-a324-4048-9857-0b4e06870999-1724828081"},{"key":"x-dc","value":"gcp-us-central1,gcp-us-east1,gcp-us-east1"},{"key":"content-encoding","value":"gzip"},{"key":"Alt-Svc","value":"h3=\":443\"; ma=86400"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=SJAXBzOQpqQsXAF4MAlK38dAUXsjXxKlrOcmuHgNfFAYtBXAJ878l225KgNwMZzYJ3FW2yv2qJy1w3d1ScFcAb5Zxt0HUAll%2FFxDQczo8FOfqr0puDUgWbe8xxYErboTWNCzlFQ3O0M%3D\"}],\"group\":\"cf-nel\",\"max_age\":604800}"},{"key":"NEL","value":"{\"success_fraction\":0.01,\"report_to\":\"cf-nel\",\"max_age\":604800}"},{"key":"Server-Timing","value":"cfRequestDuration;dur=283.999920"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8ba264327ced5700-TPE"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"order\": {\n            \"id\": \"gid://shopify/Order/5489068441777\",\n            \"name\": \"#1164\",\n            \"customAttributes\": [\n                {\n                    \"key\": \"運送方法(ShippingMethod)\",\n                    \"value\": \"宅配\"\n                },\n                {\n                    \"key\": \"包裹尺寸(Specification)\",\n                    \"value\": \"0001\"\n                },\n                {\n                    \"key\": \"物流子代碼(LogisticsSubType)\",\n                    \"value\": \"TCAT\"\n                },\n                {\n                    \"key\": \"發票種類(InvoiceType)\",\n                    \"value\": \"e-invoice\"\n                },\n                {\n                    \"key\": \"超取串接類型(CvsVendor)\",\n                    \"value\": \"ecpay\"\n                },\n                {\n                    \"key\": \"代處理發票(DelegateInvoice)\",\n                    \"value\": \"Y\"\n                }\n            ]\n        }\n    },\n    \"extensions\": {\n        \"cost\": {\n            \"requestedQueryCost\": 2,\n            \"actualQueryCost\": 2,\n            \"throttleStatus\": {\n                \"maximumAvailable\": 2000,\n                \"currentlyAvailable\": 1998,\n                \"restoreRate\": 100\n            }\n        }\n    }\n}"}],"_postman_id":"d56954bd-61f7-4ca5-ab1f-9ed5400c1116"},{"name":"[REST] Get attributes of an order","id":"12698ffd-7201-4925-8e0b-e5c6e5174e3b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"X-Shopify-Access-Token","value":"{{shopify-app-token}}","type":"text"}],"url":"https://{{shopify-store}}/admin/api/{{shopify-api-version}}/orders/5489068441777.json","urlObject":{"protocol":"https","path":["admin","api","{{shopify-api-version}}","orders","5489068441777.json"],"host":["{{shopify-store}}"],"query":[],"variable":[]}},"response":[{"id":"aa3de634-f6d3-4603-959f-b5957489d7de","name":"Success","originalRequest":{"method":"GET","header":[{"key":"X-Shopify-Access-Token","value":"{{shopify-app-token}}","type":"text"}],"url":{"raw":"https://{{shopify-store}}/admin/api/{{shopify-api-version}}/metafields.json?namespace=akohub&key=referralLink","protocol":"https","host":["{{shopify-store}}"],"path":["admin","api","{{shopify-api-version}}","metafields.json"],"query":[{"key":"namespace","value":"akohub"},{"key":"key","value":"referralLink"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 27 Feb 2024 08:25:23 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Sorting-Hat-PodId","value":"42"},{"key":"X-Sorting-Hat-ShopId","value":"30020802"},{"key":"Vary","value":"Accept-Encoding"},{"key":"referrer-policy","value":"origin-when-cross-origin"},{"key":"x-frame-options","value":"DENY"},{"key":"x-shopid","value":"30020802"},{"key":"x-shardid","value":"42"},{"key":"x-stats-userid","value":""},{"key":"x-stats-apiclientid","value":"32023871489"},{"key":"x-stats-apipermissionid","value":"367959310379"},{"key":"x-shopify-api-version","value":"2024-01"},{"key":"http_x_shopify_shop_api_call_limit","value":"1/40"},{"key":"x-shopify-shop-api-call-limit","value":"1/40"},{"key":"strict-transport-security","value":"max-age=7889238"},{"key":"server-timing","value":"processing;dur=40"},{"key":"x-shopify-stage","value":"production"},{"key":"content-security-policy","value":"default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://* shopify-pos://*; block-all-mixed-content; child-src 'self' https://* shopify-pos://*; connect-src 'self' wss://* https://*; frame-ancestors 'none'; img-src 'self' data: blob: https:; script-src https://cdn.shopify.com https://cdn.shopifycdn.net https://checkout.shopifycs.com https://api.stripe.com https://mpsnare.iesnare.com https://appcenter.intuit.com https://www.paypal.com https://js.braintreegateway.com https://c.paypal.com https://maps.googleapis.com https://www.google-analytics.com https://v.shopify.com 'self' 'unsafe-inline' 'unsafe-eval'; upgrade-insecure-requests; report-uri /csp-report?source%5Baction%5D=index&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fmetafields&source%5Bsection%5D=admin_api&source%5Buuid%5D=13597921-fe69-4a64-a056-738b4f5d2c3c"},{"key":"x-content-type-options","value":"nosniff"},{"key":"x-download-options","value":"noopen"},{"key":"x-permitted-cross-domain-policies","value":"none"},{"key":"x-xss-protection","value":"1; mode=block; report=/xss-report?source%5Baction%5D=index&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fmetafields&source%5Bsection%5D=admin_api&source%5Buuid%5D=13597921-fe69-4a64-a056-738b4f5d2c3c"},{"key":"x-envoy-upstream-service-time","value":"42"},{"key":"X-Dc","value":"gcp-asia-east1,gcp-us-central1"},{"key":"X-Request-ID","value":"13597921-fe69-4a64-a056-738b4f5d2c3c"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=xXU6u2n7I%2B0p5iggCXWYM5DQ1c0SuOzQrO%2ByAtdj1HsO68M7Wtbuv%2Fq3d9pSWzsjXKYj4ZLYah1BNO7%2B%2Fq%2FH35zKIeknLz%2BecEmSJqsODEenN3yUthTzKe5O52m0Rc9QD8tA7E0G7hn%2Fe3m923A%3D\"}],\"group\":\"cf-nel\",\"max_age\":604800}"},{"key":"NEL","value":"{\"success_fraction\":0.01,\"report_to\":\"cf-nel\",\"max_age\":604800}"},{"key":"Server-Timing","value":"cfRequestDuration;dur=217.000008"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"85bf096f381e4a0f-TPE"},{"key":"Content-Encoding","value":"br"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"metafields\": [\n        {\n            \"id\": 23078621675563,\n            \"namespace\": \"akohub\",\n            \"key\": \"referralLink\",\n            \"value\": \"https://glitzzie-party.myshopify.com\",\n            \"description\": null,\n            \"owner_id\": 30020802,\n            \"created_at\": \"2024-01-16T03:56:40-05:00\",\n            \"updated_at\": \"2024-01-26T03:27:18-05:00\",\n            \"owner_resource\": \"shop\",\n            \"type\": \"string\",\n            \"admin_graphql_api_id\": \"gid://shopify/Metafield/23078621675563\"\n        }\n    ]\n}"}],"_postman_id":"12698ffd-7201-4925-8e0b-e5c6e5174e3b"}],"id":"659dc2a1-4657-48cd-9467-94bf8df376ab","description":"<h3 id=\"prerequisites\"><strong>Prerequisites</strong></h3>\n<p>The <a href=\"https://apps.shopify.com/taiwan-shipping\">Ako CVS app</a> must be installed on your Shopify store.</p>\n<h3 id=\"overview\"><strong>Overview</strong></h3>\n<p>The logistics and invoice information are added to the <code>note_attributes</code> of a Shopify order for reference. For detailed informaion, please refer to <a href=\"https://akohub.com/tw/blogs/akohub-commerce-help-center/how-to-edit-order-note-attritutes#5.%E4%BF%AE%E6%94%B9%E8%A8%82%E5%96%AE%E8%B3%87%E6%96%99\">our help center</a>.</p>\n<h1 id=\"convenience-store-pickup-service-超商取貨\">Convenience Store Pickup Service 超商取貨</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>7-11 Example Value</th>\n<th>FamilyMart Example Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>運送方法(ShippingMethod)</td>\n<td>超商取貨</td>\n<td>超商取貨</td>\n</tr>\n<tr>\n<td>門市代號(CvsStoreId)</td>\n<td>924757</td>\n<td>18319</td>\n</tr>\n<tr>\n<td>超商類型(CvsCompany)</td>\n<td>7-ELEVEN</td>\n<td>全家</td>\n</tr>\n<tr>\n<td>超商門市(CvsStoreName)</td>\n<td>信利門市</td>\n<td>全家淡水竹圍店</td>\n</tr>\n<tr>\n<td>超取串接類型(CvsVendor)</td>\n<td>ecpay, ezship, myship</td>\n<td>ecpay, ezship, myship</td>\n</tr>\n<tr>\n<td>門市地址(CvsCity)</td>\n<td>新北市</td>\n<td>新北市</td>\n</tr>\n<tr>\n<td>門市郵遞區號(CvsZip)</td>\n<td>251</td>\n<td>251</td>\n</tr>\n<tr>\n<td>物流子代碼(LogisticsSubType)</td>\n<td>UNIMART</td>\n<td>UNIMARTC2C</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"delivery-service-宅配\">Delivery Service 宅配</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>名稱</th>\n<th>綠界／黑貓</th>\n<th>綠界／郵局</th>\n<th>新竹物流</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>運送方法(ShippingMethod)</td>\n<td>宅配</td>\n<td>宅配</td>\n<td>宅配</td>\n</tr>\n<tr>\n<td>物流子代碼(LogisticsSubType)</td>\n<td>TCAT</td>\n<td>POST</td>\n<td>HCT</td>\n</tr>\n<tr>\n<td>包裹溫層(Temperature)</td>\n<td>0001</td>\n<td>0002</td>\n<td>0003</td>\n</tr>\n<tr>\n<td>包裹尺寸(Specification)</td>\n<td>0001</td>\n<td>0002</td>\n<td>0003</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"invoice-發票\">Invoice 發票</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Example Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>發票種類(InvoiceType)</td>\n<td>e-invoice</td>\n</tr>\n<tr>\n<td>代處理發票(DelegateInvoice)</td>\n<td>Y</td>\n</tr>\n<tr>\n<td>載具類型(CarrierType)</td>\n<td>手機條碼</td>\n</tr>\n<tr>\n<td>載具編號(CarrierNum)</td>\n<td>/ABC+123</td>\n</tr>\n<tr>\n<td>公司名稱(CompanyName)</td>\n<td>台灣積體電路製造股份有限公司</td>\n</tr>\n<tr>\n<td>統一編號(CompanyId)</td>\n<td>22099131</td>\n</tr>\n<tr>\n<td>捐贈碼(LoveCode)</td>\n<td>05288</td>\n</tr>\n<tr>\n<td>發票號碼(InvoiceNumber)</td>\n<td>AZ66000001</td>\n</tr>\n<tr>\n<td>發票建立時間(InvoiceDatetime)</td>\n<td>2022-05-02 13:02:48</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"659dc2a1-4657-48cd-9467-94bf8df376ab"},{"name":"Get order tags relating to shipping","item":[{"name":"[GraphQL] Get tags of an order","id":"a99e65f7-2d71-4c50-aece-9b6acd525405","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Shopify-Access-Token","value":"{{shopify-app-token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query {\n    order(id: \"gid://shopify/Order/5489068441777\") {\n    id\n    name\n    customAttributes {\n        key\n        value\n    }\n    tags\n  }\n}","variables":""}},"url":"https://{{shopify-store}}/admin/api/{{shopify-api-version}}/graphql.json","urlObject":{"protocol":"https","path":["admin","api","{{shopify-api-version}}","graphql.json"],"host":["{{shopify-store}}"],"query":[],"variable":[]}},"response":[{"id":"877e7df1-b49a-407b-8dcb-41471492f9bb","name":"Success","originalRequest":{"method":"POST","header":[{"key":"X-Shopify-Access-Token","value":"{{shopify-app-token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query {\n    order(id: \"gid://shopify/Order/5489068441777\") {\n    id\n    name\n    customAttributes {\n        key\n        value\n    }\n  }\n}","variables":""}},"url":"https://{{shopify-store}}/admin/api/{{shopify-api-version}}/graphql.json"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 28 Aug 2024 06:54:41 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"x-sorting-hat-podid","value":"176"},{"key":"x-sorting-hat-shopid","value":"59007467697"},{"key":"vary","value":"Accept-Encoding"},{"key":"referrer-policy","value":"origin-when-cross-origin"},{"key":"x-frame-options","value":"DENY"},{"key":"x-shopid","value":"59007467697"},{"key":"x-shardid","value":"176"},{"key":"x-stats-userid","value":""},{"key":"x-stats-apiclientid","value":"143749447681"},{"key":"x-stats-apipermissionid","value":"479776506033"},{"key":"x-shopify-api-version","value":"2024-01"},{"key":"content-language","value":"en"},{"key":"strict-transport-security","value":"max-age=7889238"},{"key":"x-request-id","value":"a506127f-a324-4048-9857-0b4e06870999-1724828081"},{"key":"server-timing","value":"processing;dur=69, graphql;desc=\"admin/query/other\""},{"key":"content-security-policy","value":"default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://* shopify-pos://*; block-all-mixed-content; child-src 'self' https://* shopify-pos://*; connect-src 'self' wss://* https://*; frame-ancestors 'none'; img-src 'self' data: blob: https:; script-src https://cdn.shopify.com https://cdn.shopifycdn.net https://checkout.shopifycs.com https://api.stripe.com https://mpsnare.iesnare.com https://appcenter.intuit.com https://www.paypal.com https://js.braintreegateway.com https://c.paypal.com https://maps.googleapis.com https://www.google-analytics.com https://v.shopify.com 'self' 'unsafe-inline' 'unsafe-eval'; upgrade-insecure-requests; report-uri /csp-report?source%5Baction%5D=query&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fgraphql&source%5Bsection%5D=admin_api&source%5Buuid%5D=a506127f-a324-4048-9857-0b4e06870999-1724828081"},{"key":"x-content-type-options","value":"nosniff"},{"key":"x-download-options","value":"noopen"},{"key":"x-permitted-cross-domain-policies","value":"none"},{"key":"x-xss-protection","value":"1; mode=block; report=/xss-report?source%5Baction%5D=query&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fgraphql&source%5Bsection%5D=admin_api&source%5Buuid%5D=a506127f-a324-4048-9857-0b4e06870999-1724828081"},{"key":"x-dc","value":"gcp-us-central1,gcp-us-east1,gcp-us-east1"},{"key":"content-encoding","value":"gzip"},{"key":"Alt-Svc","value":"h3=\":443\"; ma=86400"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=SJAXBzOQpqQsXAF4MAlK38dAUXsjXxKlrOcmuHgNfFAYtBXAJ878l225KgNwMZzYJ3FW2yv2qJy1w3d1ScFcAb5Zxt0HUAll%2FFxDQczo8FOfqr0puDUgWbe8xxYErboTWNCzlFQ3O0M%3D\"}],\"group\":\"cf-nel\",\"max_age\":604800}"},{"key":"NEL","value":"{\"success_fraction\":0.01,\"report_to\":\"cf-nel\",\"max_age\":604800}"},{"key":"Server-Timing","value":"cfRequestDuration;dur=283.999920"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8ba264327ced5700-TPE"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"order\": {\n            \"id\": \"gid://shopify/Order/5489068441777\",\n            \"name\": \"#1164\",\n            \"customAttributes\": [\n                {\n                    \"key\": \"運送方法(ShippingMethod)\",\n                    \"value\": \"宅配\"\n                },\n                {\n                    \"key\": \"包裹尺寸(Specification)\",\n                    \"value\": \"0001\"\n                },\n                {\n                    \"key\": \"物流子代碼(LogisticsSubType)\",\n                    \"value\": \"TCAT\"\n                },\n                {\n                    \"key\": \"發票種類(InvoiceType)\",\n                    \"value\": \"e-invoice\"\n                },\n                {\n                    \"key\": \"超取串接類型(CvsVendor)\",\n                    \"value\": \"ecpay\"\n                },\n                {\n                    \"key\": \"代處理發票(DelegateInvoice)\",\n                    \"value\": \"Y\"\n                }\n            ]\n        }\n    },\n    \"extensions\": {\n        \"cost\": {\n            \"requestedQueryCost\": 2,\n            \"actualQueryCost\": 2,\n            \"throttleStatus\": {\n                \"maximumAvailable\": 2000,\n                \"currentlyAvailable\": 1998,\n                \"restoreRate\": 100\n            }\n        }\n    }\n}"}],"_postman_id":"a99e65f7-2d71-4c50-aece-9b6acd525405"}],"id":"62fc57ac-b933-4b39-8503-bae6e9bc6c97","description":"<h3 id=\"prerequisites\"><strong>Prerequisites</strong></h3>\n<p>The <a href=\"https://apps.shopify.com/taiwan-shipping\">Ako CVS app</a> must be installed on your Shopify store.</p>\n<h3 id=\"overview\"><strong>Overview</strong></h3>\n<p>The Ako CVS App marks important delivery status updates as tags to each order. Below is the list of key stages and possible tags.</p>\n<h1 id=\"正物流\">正物流</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>配送方式</th>\n<th>訂單成立後</th>\n<th>建立物流單後</th>\n<th><strong>配送完成後</strong></th>\n<th><strong>例外情況</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>超商取貨</td>\n<td><code>7-11</code> / <code>全家</code></td>\n<td><code>超商取貨/上傳成功</code>  <br />或  <br /><code>超商取貨/上傳失敗</code></td>\n<td><code>超商取貨/商品已送達門市</code>  <br /><code>超商取貨/消費者已取件</code></td>\n<td><code>超商取貨/消費者七天未取件</code></td>\n</tr>\n<tr>\n<td>宅配：綠界郵局</td>\n<td><code>綠界郵局</code></td>\n<td><code>綠界郵局/上傳成功</code>  <br />或  <br /><code>綠界郵局/上傳失敗</code></td>\n<td><code>綠界郵局/已送達</code></td>\n<td></td>\n</tr>\n<tr>\n<td>宅配：綠界黑貓</td>\n<td><code>綠界黑貓</code></td>\n<td><code>綠界黑貓/上傳成功</code>  <br />或  <br /><code>綠界黑貓/上傳失敗</code></td>\n<td><code>綠界黑貓/已送達</code></td>\n<td></td>\n</tr>\n<tr>\n<td>宅配：新竹物流</td>\n<td><code>新竹物流</code></td>\n<td><code>新竹物流/上傳成功</code>  <br />或  <br /><code>新竹物流/上傳失敗</code></td>\n<td>N/A</td>\n<td></td>\n</tr>\n<tr>\n<td>宅配：新竹倉儲</td>\n<td><code>新竹倉儲</code></td>\n<td><code>新竹倉儲/上傳成功</code>  <br />或  <br /><code>新竹倉儲/上傳失敗</code></td>\n<td><code>新竹物流/已配達</code></td>\n<td><code>新竹物流/配送異常</code>  <br /><code>新竹物流/喪失或拒收退回</code></td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"逆物流\">逆物流</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>配送方式</th>\n<th>建立退貨作業後</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>7-11 退貨便</td>\n<td><code>711/逆物流上傳成功</code>  <br />或  <br /><code>711/逆物流上傳失敗</code></td>\n</tr>\n<tr>\n<td>新竹物流</td>\n<td></td>\n</tr>\n<tr>\n<td>新竹倉儲</td>\n<td><code>新竹倉儲/逆物流上傳成功</code>  <br />或  <br /><code>新竹倉儲/逆物流上傳失敗</code></td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"62fc57ac-b933-4b39-8503-bae6e9bc6c97"},{"name":"Shopify Flow Events","item":[{"name":"points/changed","id":"5151fe31-3960-4e15-bf20-02735dd6e1c2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://akohub.com","description":"<p>A points balance moved. <strong><code>Change Type</code></strong> tells you how; <strong><code>Metadata.pointsChanged</code></strong> is the\n<strong>signed</strong> amount (<code>+</code> earn, <code>−</code> spend / refund / expire).</p>\n<ul>\n<li><strong><code>Source</code></strong> — <code>order</code>, <code>signup</code>, <code>birthday</code>, <code>referral</code>, <code>referral_commission</code>, <code>review</code>,\n<code>vip_tier</code>, <code>ig_reels</code>, <code>claim</code>, <code>qr</code>, <code>flow</code>, <code>partner</code>, <code>manual</code> (staff or public-API\nadjustment), <code>api</code>. Empty for checkout redemptions and expiry.</li>\n<li><strong><code>Change Type</code></strong> — <code>reward_grant</code> (earn), <code>reward_revoke</code> (clawback, e.g. an order refund\nreversing earned points), <code>redeem</code>, <code>refund</code>, <code>expire</code>, <code>adjust</code>, <code>transfer</code>,\n<code>merge</code>.</li>\n</ul>\n<h3 id=\"metadata\"><code>Metadata</code></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Always?</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>originalBalance</code></td>\n<td>✔</td>\n<td>Balance before the move — integer string.</td>\n</tr>\n<tr>\n<td><code>newBalance</code></td>\n<td>✔</td>\n<td>Balance after the move — integer string.</td>\n</tr>\n<tr>\n<td><code>pointsChanged</code></td>\n<td>✔</td>\n<td><strong>Signed</strong> delta — <code>\"100\"</code> earned, <code>\"-40\"</code> spent/expired.</td>\n</tr>\n<tr>\n<td><code>expiryDate</code></td>\n<td>✔</td>\n<td>ISO date when these points expire; <code>\"\"</code> = non-expiring.</td>\n</tr>\n<tr>\n<td><code>campaignName</code></td>\n<td>–</td>\n<td>The campaign that caused it, e.g. <code>\"Welcome gift\"</code>.</td>\n</tr>\n<tr>\n<td><code>rewardTitle</code></td>\n<td>–</td>\n<td>The specific reward within the campaign, e.g. <code>\"100 points\"</code>.</td>\n</tr>\n<tr>\n<td><code>rewardId</code></td>\n<td>–</td>\n<td>Id of the reward/campaign record.</td>\n</tr>\n<tr>\n<td><code>orderId</code> / <code>orderName</code></td>\n<td>–</td>\n<td>The order that triggered it, e.g. <code>\"#1042\"</code>.</td>\n</tr>\n<tr>\n<td><code>reason</code></td>\n<td>–</td>\n<td>System-generated description; set on take-backs (refunds, expiry).</td>\n</tr>\n<tr>\n<td><code>publicNote</code></td>\n<td>–</td>\n<td>Merchant-entered, customer-facing note.</td>\n</tr>\n<tr>\n<td><code>internalNote</code></td>\n<td>–</td>\n<td>Merchant-entered, staff-facing note.</td>\n</tr>\n<tr>\n<td><code>correlationId</code></td>\n<td>–</td>\n<td>Join key. Same value on the <code>rewards/granted</code> roll-up and every asset move from the same grant.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","host":["akohub","com"],"query":[],"variable":[]}},"response":[{"id":"0cc610b7-2768-42de-b55c-0e77b5df2865","name":"Earn on order","originalRequest":{"method":"GET","header":[],"url":"https://akohub.com"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customer_id\": 1234567890,\n  \"Event Type\": \"points/changed\",\n  \"Source\": \"order\",\n  \"Change Type\": \"reward_grant\",\n  \"Unique ID\": \"9f2a7c1e4b8d3a6f0c5e2d9b7a4f1c8e\",\n  \"Event Date\": \"2026-06-29T08:00:00.000Z\",\n  \"Trigger Date\": \"2026-06-29T08:00:01.200Z\",\n  \"Metadata\": \"{\\\"originalBalance\\\":\\\"1400\\\",\\\"newBalance\\\":\\\"1500\\\",\\\"pointsChanged\\\":\\\"100\\\",\\\"expiryDate\\\":\\\"2027-06-29T23:59:59.999Z\\\",\\\"campaignName\\\":\\\"Place an order\\\",\\\"rewardTitle\\\":\\\"100 points\\\",\\\"orderId\\\":\\\"6201234567890\\\",\\\"orderName\\\":\\\"#1001\\\",\\\"correlationId\\\":\\\"2b6d0f93a1c84e7d5f9027b3c6a1e8d4\\\"}\"\n}"}],"_postman_id":"5151fe31-3960-4e15-bf20-02735dd6e1c2"},{"name":"store_credit/changed","id":"adead1bf-9bc6-47c8-8045-ffd09ada7053","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://akohub.com","description":"<p>A Shopify store-credit balance moved. Same shape as <code>points/changed</code>, in money instead of points,\nplus the Shopify-native account/transaction references.</p>\n<ul>\n<li><strong><code>Source</code></strong> — same values as <code>points/changed</code>.</li>\n<li><strong><code>Change Type</code></strong> — <code>reward_grant</code>, <code>reward_revoke</code>, <code>redeem</code>, <code>refund</code>, <code>adjust</code>.</li>\n</ul>\n<h3 id=\"metadata\"><code>Metadata</code></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Always?</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>originalBalance</code></td>\n<td>✔</td>\n<td>Balance before — 2dp money string, e.g. <code>\"25.00\"</code>.</td>\n</tr>\n<tr>\n<td><code>newBalance</code></td>\n<td>✔</td>\n<td>Balance after — 2dp money string.</td>\n</tr>\n<tr>\n<td><code>amountChanged</code></td>\n<td>✔</td>\n<td><strong>Signed</strong> delta — <code>\"10.50\"</code> / <code>\"-10.50\"</code>.</td>\n</tr>\n<tr>\n<td><code>expiryDate</code></td>\n<td>✔</td>\n<td>ISO date the credit expires; <code>\"\"</code> = non-expiring.</td>\n</tr>\n<tr>\n<td><code>currencyCode</code></td>\n<td>–</td>\n<td>ISO currency of the store-credit account, e.g. <code>\"USD\"</code>.</td>\n</tr>\n<tr>\n<td><code>accountId</code></td>\n<td>–</td>\n<td>Shopify store-credit account id (GID).</td>\n</tr>\n<tr>\n<td><code>transactionId</code></td>\n<td>–</td>\n<td>Shopify store-credit transaction id (GID).</td>\n</tr>\n<tr>\n<td><code>campaignName</code></td>\n<td>–</td>\n<td>The campaign that caused it.</td>\n</tr>\n<tr>\n<td><code>rewardTitle</code></td>\n<td>–</td>\n<td>The specific reward within the campaign.</td>\n</tr>\n<tr>\n<td><code>rewardId</code></td>\n<td>–</td>\n<td>Id of the reward/campaign record.</td>\n</tr>\n<tr>\n<td><code>orderId</code> / <code>orderName</code></td>\n<td>–</td>\n<td>The order that triggered it.</td>\n</tr>\n<tr>\n<td><code>reason</code></td>\n<td>–</td>\n<td>System-generated description; set on take-backs.</td>\n</tr>\n<tr>\n<td><code>publicNote</code> / <code>internalNote</code></td>\n<td>–</td>\n<td>Merchant-entered notes.</td>\n</tr>\n<tr>\n<td><code>correlationId</code></td>\n<td>–</td>\n<td>Join key to the <code>rewards/granted</code> roll-up.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","host":["akohub","com"],"query":[],"variable":[]}},"response":[{"id":"a8fd00af-b822-4756-b7b6-cd311acfec8c","name":"Earn on order","originalRequest":{"method":"GET","header":[],"url":"https://akohub.com"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customer_id\": 1234567890,\n  \"Event Type\": \"store_credit/changed\",\n  \"Source\": \"vip_tier\",\n  \"Change Type\": \"reward_grant\",\n  \"Unique ID\": \"4c81e0a7d9b52f6301ae84c7b2d95f10\",\n  \"Event Date\": \"2026-06-29T08:00:00.000Z\",\n  \"Trigger Date\": \"2026-06-29T08:00:01.400Z\",\n  \"Metadata\": \"{\\\"originalBalance\\\":\\\"25.00\\\",\\\"newBalance\\\":\\\"35.50\\\",\\\"amountChanged\\\":\\\"10.50\\\",\\\"currencyCode\\\":\\\"USD\\\",\\\"accountId\\\":\\\"gid://shopify/StoreCreditAccount/12345\\\",\\\"transactionId\\\":\\\"gid://shopify/StoreCreditAccountCreditTransaction/67890\\\",\\\"expiryDate\\\":\\\"\\\",\\\"campaignName\\\":\\\"Gold tier reward\\\",\\\"rewardTitle\\\":\\\"$10.50 store credit\\\",\\\"correlationId\\\":\\\"7d3f5b21c8e04a96f2b7d015a3c6e9b8\\\"}\"\n}"}],"_postman_id":"adead1bf-9bc6-47c8-8045-ffd09ada7053"},{"name":"discount/created","id":"7405f3d5-f8c4-42df-8591-7e877f6610dd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://akohub.com","description":"<p>A <strong>per-customer</strong> discount code was issued to this customer — either as a campaign reward or\nthrough Ako's public discount API. Read <code>Source</code> to tell which.</p>\n<p>Because a discount moves no balance, this and <code>rewards/granted</code> are the <strong>only</strong> signals for a\ndiscount-type reward.</p>\n<ul>\n<li><strong><code>Source</code></strong> — a campaign source (<code>signup</code>, <code>birthday</code>, <code>vip_tier</code>, …) or <code>reward</code> when the\ncampaign source can't be resolved; <code>api</code> when issued through the public API; <code>manual</code> when Ako\nstaff issued it by hand.</li>\n<li><strong><code>Change Type</code></strong> — always empty.</li>\n</ul>\n<h3 id=\"metadata\"><code>Metadata</code></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Always?</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>discountCode</code></td>\n<td>✔</td>\n<td>The code the customer can use, e.g. <code>\"AKO-9F2K1\"</code>.</td>\n</tr>\n<tr>\n<td><code>startsAt</code></td>\n<td>✔</td>\n<td>ISO date the code becomes valid; <code>\"\"</code> = immediately.</td>\n</tr>\n<tr>\n<td><code>expiryDate</code></td>\n<td>reward</td>\n<td>ISO date the code expires; <code>\"\"</code> = no expiry. Omitted entirely on the public-API path when the code was issued without one.</td>\n</tr>\n<tr>\n<td><code>discountClass</code></td>\n<td>–</td>\n<td>What it applies to — <code>order</code>, <code>product</code>, <code>shipping</code>, <code>bxgy</code>.</td>\n</tr>\n<tr>\n<td><code>valueType</code></td>\n<td>–</td>\n<td><code>percentage</code> or <code>fixed</code>.</td>\n</tr>\n<tr>\n<td><code>value</code></td>\n<td>–</td>\n<td>Decimal string — <code>\"10\"</code> = 10% when <code>percentage</code>; <code>\"10.00\"</code> when <code>fixed</code>.</td>\n</tr>\n<tr>\n<td><code>currencyCode</code></td>\n<td>–</td>\n<td>Currency of a <code>fixed</code> value, e.g. <code>\"USD\"</code>.</td>\n</tr>\n<tr>\n<td><code>campaignName</code></td>\n<td>–</td>\n<td>Campaign title (reward path) or rule title (API path).</td>\n</tr>\n<tr>\n<td><code>rewardTitle</code></td>\n<td>–</td>\n<td>The specific reward within the campaign.</td>\n</tr>\n<tr>\n<td><code>rewardId</code></td>\n<td>–</td>\n<td>Id of the reward/campaign record.</td>\n</tr>\n<tr>\n<td><code>correlationId</code></td>\n<td>–</td>\n<td>Join key to the <code>rewards/granted</code> roll-up (reward path only).</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n<p>Join on <code>discountCode</code> to pair this with the later <code>discount/used</code> event.</p>\n</blockquote>\n","urlObject":{"protocol":"https","host":["akohub","com"],"query":[],"variable":[]}},"response":[{"id":"b99e1b4c-bc82-4cad-86a4-f1f1cb06131f","name":"Earn","originalRequest":{"method":"GET","header":[],"url":"https://akohub.com"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customer_id\": 1234567890,\n  \"Event Type\": \"discount/created\",\n  \"Source\": \"signup\",\n  \"Change Type\": \"\",\n  \"Unique ID\": \"e05b9c3a7f14d286b0c95e73a1f8d642\",\n  \"Event Date\": \"2026-06-29T08:00:00.000Z\",\n  \"Trigger Date\": \"2026-06-29T08:00:01.100Z\",\n  \"Metadata\": \"{\\\"rewardId\\\":\\\"rwd_9x2k\\\",\\\"campaignName\\\":\\\"Welcome gift\\\",\\\"rewardTitle\\\":\\\"10% off\\\",\\\"discountCode\\\":\\\"AKO-9F2K1\\\",\\\"discountClass\\\":\\\"order\\\",\\\"valueType\\\":\\\"percentage\\\",\\\"value\\\":\\\"10\\\",\\\"startsAt\\\":\\\"2026-06-29T08:00:00.000Z\\\",\\\"expiryDate\\\":\\\"2026-07-29T23:59:59.999Z\\\",\\\"correlationId\\\":\\\"1a4e8d0b6c39f752e8a1d4b7c0f3629e\\\"}\"\n}"}],"_postman_id":"7405f3d5-f8c4-42df-8591-7e877f6610dd"},{"name":"points/expiring","id":"6ed68f4d-7fb2-4d14-8ccf-a76c4bae60de","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://akohub.com","description":"<p>A reminder that a customer's points are about to expire. Sent once, for the <strong>primary</strong> reminder\nonly (the last-chance reminder does not fire this event), and independently of whether the merchant\nhas expiry emails switched on.</p>\n<ul>\n<li><strong><code>Source</code></strong> / <strong><code>Change Type</code></strong> — both empty.</li>\n<li><strong><code>Event Date</code></strong> — the moment the reminder was <strong>due</strong>, not when it was delivered.</li>\n</ul>\n<h3 id=\"metadata\"><code>Metadata</code></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Always?</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>expiryDate</code></td>\n<td>✔</td>\n<td>ISO timestamp when the points expire.</td>\n</tr>\n<tr>\n<td><code>expiringBalance</code></td>\n<td>✔</td>\n<td>Points expiring on that date — integer string, e.g. <code>\"120\"</code>.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","host":["akohub","com"],"query":[],"variable":[]}},"response":[{"id":"17db78d1-4cba-4729-9b92-6ef8db23812c","name":"Reminder","originalRequest":{"method":"GET","header":[],"url":"https://akohub.com"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customer_id\": 1234567890,\n  \"Event Type\": \"points/expiring\",\n  \"Source\": \"\",\n  \"Change Type\": \"\",\n  \"Unique ID\": \"3f7a2c85d61b09e4a8c35f720d9b6e14\",\n  \"Event Date\": \"2026-08-01T00:00:00.000Z\",\n  \"Trigger Date\": \"2026-08-01T00:03:12.700Z\",\n  \"Metadata\": \"{\\\"expiryDate\\\":\\\"2026-08-15T23:59:59.999Z\\\",\\\"expiringBalance\\\":\\\"120\\\"}\"\n}"}],"_postman_id":"6ed68f4d-7fb2-4d14-8ccf-a76c4bae60de"},{"name":"discount/expiring","id":"d5d599a3-0548-4982-a184-676cb945bf59","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://akohub.com","description":"<p>A reminder that one of the customer's discount codes is about to expire. Fires only while the code\nis still <strong>active</strong>; primary reminder only.</p>\n<ul>\n<li><strong><code>Source</code></strong> / <strong><code>Change Type</code></strong> — both empty.</li>\n<li><strong><code>Event Date</code></strong> — the moment the reminder was <strong>due</strong>, not when it was delivered.</li>\n</ul>\n<h3 id=\"metadata\"><code>Metadata</code></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Always?</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>discountCode</code></td>\n<td>✔</td>\n<td>The code that is expiring.</td>\n</tr>\n<tr>\n<td><code>discountTitle</code></td>\n<td>✔</td>\n<td>Merchant-facing title of the discount.</td>\n</tr>\n<tr>\n<td><code>expiryDate</code></td>\n<td>✔</td>\n<td>ISO timestamp when it expires.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","host":["akohub","com"],"query":[],"variable":[]}},"response":[{"id":"609cb7fd-d54f-4cc4-b0be-ad9db32080c3","name":"Reminder","originalRequest":{"method":"GET","header":[],"url":"https://akohub.com"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customer_id\": 1234567890,\n  \"Event Type\": \"discount/expiring\",\n  \"Source\": \"\",\n  \"Change Type\": \"\",\n  \"Unique ID\": \"5c8e1b47a6d2093f8b41e7c05a9d3612\",\n  \"Event Date\": \"2026-08-01T00:00:00.000Z\",\n  \"Trigger Date\": \"2026-08-01T00:03:15.900Z\",\n  \"Metadata\": \"{\\\"discountCode\\\":\\\"AKO-9F2K1\\\",\\\"discountTitle\\\":\\\"10% off\\\",\\\"expiryDate\\\":\\\"2026-08-15T23:59:59.999Z\\\"}\"\n}"}],"_postman_id":"d5d599a3-0548-4982-a184-676cb945bf59"},{"name":"discount/used","id":"47108dd0-f789-4e86-96de-5ea0398fc44a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://akohub.com","description":"<p>The customer used one of <strong>your per-customer</strong> discount codes in an order. One event per code, so an\norder using two codes delivers two events (de-dupe on <code>Unique ID</code>).</p>\n<p>Public / segment-wide codes are <strong>not</strong> covered — only codes issued to a specific customer.</p>\n<ul>\n<li><strong><code>Source</code></strong> / <strong><code>Change Type</code></strong> — both empty.</li>\n</ul>\n<h3 id=\"metadata\"><code>Metadata</code></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Always?</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>discountCode</code></td>\n<td>✔</td>\n<td>The code that was used.</td>\n</tr>\n<tr>\n<td><code>orderId</code></td>\n<td>✔</td>\n<td>The order it was used in.</td>\n</tr>\n<tr>\n<td><code>rewardId</code></td>\n<td>–</td>\n<td>Id of the reward that issued the code.</td>\n</tr>\n<tr>\n<td><code>rewardTitle</code></td>\n<td>–</td>\n<td>Title of that reward.</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n<p>The discount's type and value are not repeated here — join on <code>discountCode</code> to the\n<code>discount/created</code> event, which carries them.</p>\n</blockquote>\n","urlObject":{"protocol":"https","host":["akohub","com"],"query":[],"variable":[]}},"response":[{"id":"1a6145ce-18d3-428b-b76f-f24b858fc092","name":"Used","originalRequest":{"method":"GET","header":[],"url":"https://akohub.com"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customer_id\": 1234567890,\n  \"Event Type\": \"discount/used\",\n  \"Source\": \"\",\n  \"Change Type\": \"\",\n  \"Unique ID\": \"af58120d9c637be4a2f80d51c9b3e746\",\n  \"Event Date\": \"2026-07-14T16:03:22.000Z\",\n  \"Trigger Date\": \"2026-07-14T16:03:23.100Z\",\n  \"Metadata\": \"{\\\"discountCode\\\":\\\"AKO-9F2K1\\\",\\\"orderId\\\":\\\"6201234577777\\\",\\\"rewardId\\\":\\\"rwd_9x2k\\\",\\\"rewardTitle\\\":\\\"10% off\\\"}\"\n}"}],"_postman_id":"47108dd0-f789-4e86-96de-5ea0398fc44a"},{"name":"store_credit/expiring","id":"8907e65e-4964-40ba-a79a-86036de8f963","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://akohub.com","description":"<p>A reminder that a customer's store credit is about to expire. Primary reminder only; fires\nindependently of the expiry email.</p>\n<ul>\n<li><strong><code>Source</code></strong> / <strong><code>Change Type</code></strong> — both empty.</li>\n<li><strong><code>Event Date</code></strong> — the moment the reminder was <strong>due</strong>, not when it was delivered.</li>\n</ul>\n<h3 id=\"metadata\"><code>Metadata</code></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Always?</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>expiryDate</code></td>\n<td>✔</td>\n<td>ISO timestamp when the credit expires.</td>\n</tr>\n<tr>\n<td><code>expiringBalance</code></td>\n<td>✔</td>\n<td>Amount expiring — 2dp money string, e.g. <code>\"50.25\"</code>.</td>\n</tr>\n<tr>\n<td><code>currencyCode</code></td>\n<td>–</td>\n<td>ISO currency, e.g. <code>\"USD\"</code>.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","host":["akohub","com"],"query":[],"variable":[]}},"response":[{"id":"31f3a93d-d729-47d8-9f6d-b74102b7a04e","name":"Reminder","originalRequest":{"method":"GET","header":[],"url":"https://akohub.com"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customer_id\": 1234567890,\n  \"Event Type\": \"store_credit/expiring\",\n  \"Source\": \"\",\n  \"Change Type\": \"\",\n  \"Unique ID\": \"a19d63c7e0b5482f1a7c93d06b5e2814\",\n  \"Event Date\": \"2026-08-01T00:00:00.000Z\",\n  \"Trigger Date\": \"2026-08-01T00:03:14.100Z\",\n  \"Metadata\": \"{\\\"expiryDate\\\":\\\"2026-08-15T23:59:59.999Z\\\",\\\"expiringBalance\\\":\\\"50.25\\\",\\\"currencyCode\\\":\\\"USD\\\"}\"\n}"}],"_postman_id":"8907e65e-4964-40ba-a79a-86036de8f963"},{"name":"tier/changed","id":"ac978158-3c73-4493-8608-65716308dde7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://akohub.com","description":"<p>The customer's VIP tier changed. This is the <strong>qualification</strong> event — any reward attached to the\nnew tier arrives separately on <code>rewards/granted</code> / the asset topics, sharing the same\n<code>correlationId</code>.</p>\n<ul>\n<li><strong><code>Source</code></strong> / <strong><code>Change Type</code></strong> — both empty.</li>\n</ul>\n<h3 id=\"metadata\"><code>Metadata</code></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Always?</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>newTierName</code></td>\n<td>✔</td>\n<td>Tier the customer is now in, e.g. <code>\"Gold\"</code>.</td>\n</tr>\n<tr>\n<td><code>originTierName</code></td>\n<td>✔</td>\n<td>Tier they were in before; <code>\"\"</code> if they had none.</td>\n</tr>\n<tr>\n<td><code>action</code></td>\n<td>✔</td>\n<td><code>upgrade</code> · <code>downgrade</code> · <code>rollback</code> (undo of a tier they no longer qualify for) · <code>initial</code> (first assignment) · <code>keep</code> (renewed at expiry).</td>\n</tr>\n<tr>\n<td><code>tierExpiryDate</code></td>\n<td>✔</td>\n<td>ISO date the new tier expires; <code>\"\"</code> = no expiry.</td>\n</tr>\n<tr>\n<td><code>publicNote</code> / <code>internalNote</code></td>\n<td>–</td>\n<td>Merchant-entered notes.</td>\n</tr>\n<tr>\n<td><code>correlationId</code></td>\n<td>–</td>\n<td>Join key — shared with the tier's reward events.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","host":["akohub","com"],"query":[],"variable":[]}},"response":[{"id":"aa1d042a-d34e-44be-a2ac-b1fad5d7de78","name":"Upgrade to Gold","originalRequest":{"method":"GET","header":[],"url":"https://akohub.com"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customer_id\": 1234567890,\n  \"Event Type\": \"tier/changed\",\n  \"Source\": \"\",\n  \"Change Type\": \"\",\n  \"Unique ID\": \"b8c14f6d90a27e35c1b84d0f7a2e693c\",\n  \"Event Date\": \"2026-06-29T08:00:00.000Z\",\n  \"Trigger Date\": \"2026-06-29T08:00:00.900Z\",\n  \"Metadata\": \"{\\\"originTierName\\\":\\\"Silver\\\",\\\"newTierName\\\":\\\"Gold\\\",\\\"action\\\":\\\"upgrade\\\",\\\"tierExpiryDate\\\":\\\"2027-06-29T23:59:59.999Z\\\",\\\"correlationId\\\":\\\"6e2b9d40a1f83c75b6e0d29a4c7f1385\\\"}\"\n}"}],"_postman_id":"ac978158-3c73-4493-8608-65716308dde7"},{"name":"rewards/granted","id":"53197ed0-95d8-4569-8352-f46ad8204b45","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://akohub.com","description":"<p><strong>The reward lens.</strong> A campaign reward was granted — regardless of type. A campaign can grant\nseveral rewards at once (points + store credit + a discount code); they all ride in <strong>one</strong> event as\nthe <code>rewards</code> array, not one event per reward.</p>\n<p>Use this for \"the customer got a reward\" automations. For \"a balance moved\", use the asset topics\ninstead — never subscribe both to the same reaction.</p>\n<p>Fires only for <strong>configured</strong> rewards. Staff corrections (<code>Source = manual</code>) and programmatic\nissuance (<code>Source = api</code>) do not fire it.</p>\n<ul>\n<li><strong><code>Source</code></strong> — <code>order</code> · <code>signup</code> · <code>review</code> · <code>referral</code> · <code>referral_commission</code> · <code>birthday</code> ·\n<code>vip_tier</code> · <code>ig_reels</code> · <code>claim</code> · <code>qr</code> · <code>flow</code> · <code>partner</code>.</li>\n<li><strong><code>Change Type</code></strong> — always empty (the roll-up isn't a single balance move).</li>\n</ul>\n<h3 id=\"metadata\"><code>Metadata</code></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Always?</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>rewards</code></td>\n<td>✔</td>\n<td><strong>Array</strong> — one entry per reward in the grant (see below).</td>\n</tr>\n<tr>\n<td><code>campaignName</code></td>\n<td>–</td>\n<td>The campaign, e.g. <code>\"Welcome gift\"</code>.</td>\n</tr>\n<tr>\n<td><code>rewardId</code></td>\n<td>–</td>\n<td>Id of the reward/campaign record.</td>\n</tr>\n<tr>\n<td><code>correlationId</code></td>\n<td>–</td>\n<td>Join key — same value on every asset event from this grant, and on the <code>tier/changed</code> that triggered a VIP-tier reward.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"rewards-entry\"><code>rewards[]</code> entry</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>When</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>rewardType</code></td>\n<td>✔</td>\n<td><code>points</code> · <code>storeCredit</code> · <code>discount</code>.</td>\n</tr>\n<tr>\n<td><code>rewardTitle</code></td>\n<td>–</td>\n<td>Title of this specific reward, e.g. <code>\"10% off\"</code>.</td>\n</tr>\n<tr>\n<td><code>value</code></td>\n<td>points / storeCredit</td>\n<td>Amount granted — integer string for points, 2dp money string for store credit.</td>\n</tr>\n<tr>\n<td><code>discountCode</code></td>\n<td>discount</td>\n<td>The issued code.</td>\n</tr>\n<tr>\n<td><code>discountClass</code></td>\n<td>discount</td>\n<td><code>order</code> · <code>product</code> · <code>shipping</code> · <code>bxgy</code>.</td>\n</tr>\n<tr>\n<td><code>valueType</code></td>\n<td>discount, has a value</td>\n<td><code>percentage</code> or <code>fixed</code>. Absent on a free-shipping reward, which carries no value.</td>\n</tr>\n<tr>\n<td><code>value</code></td>\n<td>discount, has a value</td>\n<td><code>\"10\"</code> = 10% when <code>percentage</code>; <code>\"10.00\"</code> when <code>fixed</code>.</td>\n</tr>\n<tr>\n<td><code>currencyCode</code></td>\n<td>discount, <code>fixed</code></td>\n<td>Currency of the fixed amount.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","host":["akohub","com"],"query":[],"variable":[]}},"response":[{"id":"b9f7f0a5-a6d7-4a7b-86ac-2933314822d5","name":"Welcome gift","originalRequest":{"method":"GET","header":[],"url":"https://akohub.com"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customer_id\": 1234567890,\n  \"Event Type\": \"rewards/granted\",\n  \"Source\": \"signup\",\n  \"Change Type\": \"\",\n  \"Unique ID\": \"5e91d24b0a7c36f85b2e0d17c94a36f2\",\n  \"Event Date\": \"2026-06-29T08:00:00.000Z\",\n  \"Trigger Date\": \"2026-06-29T08:00:01.000Z\",\n  \"Metadata\": \"{\\\"campaignName\\\":\\\"Welcome gift\\\",\\\"rewardId\\\":\\\"rwd_9x2k\\\",\\\"rewards\\\":[{\\\"rewardType\\\":\\\"points\\\",\\\"rewardTitle\\\":\\\"100 points\\\",\\\"value\\\":\\\"100\\\"},{\\\"rewardType\\\":\\\"storeCredit\\\",\\\"rewardTitle\\\":\\\"$5 credit\\\",\\\"value\\\":\\\"5.00\\\"},{\\\"rewardType\\\":\\\"discount\\\",\\\"rewardTitle\\\":\\\"10% off\\\",\\\"discountCode\\\":\\\"AKO-9F2K1\\\",\\\"discountClass\\\":\\\"order\\\",\\\"valueType\\\":\\\"percentage\\\",\\\"value\\\":\\\"10\\\"}],\\\"correlationId\\\":\\\"1a4e8d0b6c39f752e8a1d4b7c0f3629e\\\"}\"\n}"}],"_postman_id":"53197ed0-95d8-4569-8352-f46ad8204b45"},{"name":"rewards/revoked","id":"d00397ad-f5bf-4cdd-b368-4dedcdcee382","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://akohub.com","description":"<p>A previously granted reward was clawed back — the mirror of <code>rewards/granted</code>, same bundled shape.\nTypical causes: an order refund reversing earned points, or a VIP rollback undoing tier rewards.</p>\n<p><strong>Points and store credit only.</strong> A discount reward cannot be clawed back once issued, so revoking\none emits no event.</p>\n<ul>\n<li><strong><code>Source</code></strong> — always empty on this topic. Identify what was reversed from <code>rewardId</code> /\n<code>campaignName</code> in <code>Metadata</code> instead.</li>\n<li><strong><code>Change Type</code></strong> — always empty.</li>\n</ul>\n<h3 id=\"metadata\"><code>Metadata</code></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Always?</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>rewards</code></td>\n<td>✔</td>\n<td><strong>Array</strong> — <code>rewardType</code> (<code>points</code> / <code>storeCredit</code>), <code>rewardTitle</code>, and <code>value</code> as a <strong>negative</strong> string, e.g. <code>\"-100\"</code>.</td>\n</tr>\n<tr>\n<td><code>campaignName</code></td>\n<td>–</td>\n<td>The campaign being reversed. Absent on order-refund clawbacks.</td>\n</tr>\n<tr>\n<td><code>rewardId</code></td>\n<td>–</td>\n<td>Id of the reward being reversed — use this to match back to the original grant.</td>\n</tr>\n<tr>\n<td><code>correlationId</code></td>\n<td>–</td>\n<td>Join key to this revoke's own asset events. It does <strong>not</strong> match the original <code>rewards/granted</code> — match on <code>rewardId</code> instead.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","host":["akohub","com"],"query":[],"variable":[]}},"response":[{"id":"f0d9404f-874a-4f83-9ebb-ee714b5a9021","name":"Points clawed back","originalRequest":{"method":"GET","header":[],"url":"https://akohub.com"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customer_id\": 1234567890,\n  \"Event Type\": \"rewards/revoked\",\n  \"Source\": \"\",\n  \"Change Type\": \"\",\n  \"Unique ID\": \"c86f0b31a7d9a254e0b8c1f36a7d0492\",\n  \"Event Date\": \"2026-07-22T13:40:55.000Z\",\n  \"Trigger Date\": \"2026-07-22T13:40:56.200Z\",\n  \"Metadata\": \"{\\\"campaignName\\\":\\\"Place an order\\\",\\\"rewardId\\\":\\\"rwd_order1\\\",\\\"rewards\\\":[{\\\"rewardType\\\":\\\"points\\\",\\\"rewardTitle\\\":\\\"100 points\\\",\\\"value\\\":\\\"-100\\\"}],\\\"correlationId\\\":\\\"9b04e7c2a18d65f3b0a7e24c91d5f836\\\"}\"\n}"}],"_postman_id":"d00397ad-f5bf-4cdd-b368-4dedcdcee382"},{"name":"customer/birthday","id":"03bbffbd-357d-4c6a-9ed9-891fcc5cbc48","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://akohub.com","description":"<p>The customer's birthday came round. Reward-independent: it fires whether or not a birthday reward\nis configured, and any reward arrives separately on <code>rewards/granted</code>.</p>\n<ul>\n<li><strong><code>Source</code></strong> / <strong><code>Change Type</code></strong> — both empty.</li>\n<li><strong><code>Metadata</code></strong> — empty (<code>\"\"</code>). <code>Event Date</code> is the scheduled birthday date.</li>\n</ul>\n","urlObject":{"protocol":"https","host":["akohub","com"],"query":[],"variable":[]}},"response":[{"id":"a8687ff3-d557-485f-818d-fe3d8dd25ab1","name":"Birthday","originalRequest":{"method":"GET","header":[],"url":"https://akohub.com"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customer_id\": 1234567890,\n  \"Event Type\": \"customer/birthday\",\n  \"Source\": \"\",\n  \"Change Type\": \"\",\n  \"Unique ID\": \"72e9b04c8d1a635f0b7e2c94a6d81035\",\n  \"Event Date\": \"2026-09-14T00:00:00.000Z\",\n  \"Trigger Date\": \"2026-09-14T00:02:47.800Z\",\n  \"Metadata\": \"\"\n}"}],"_postman_id":"03bbffbd-357d-4c6a-9ed9-891fcc5cbc48"},{"name":"customer/profile_completed","id":"ec76201f-aa59-43f3-a788-850b0ee4e24e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://akohub.com","description":"<p>The customer completed their loyalty profile — the moment <strong>both</strong> gender and birthday are on\nrecord. Fires only on the incomplete → complete transition, never on a later edit.</p>\n<ul>\n<li><strong><code>Source</code></strong> / <strong><code>Change Type</code></strong> — both empty.</li>\n<li><strong><code>Metadata</code></strong> — empty (<code>\"\"</code>).</li>\n</ul>\n","urlObject":{"protocol":"https","host":["akohub","com"],"query":[],"variable":[]}},"response":[{"id":"a3b68408-388b-45c6-b7a5-1dca5799d05a","name":"Complete Profile","originalRequest":{"method":"GET","header":[],"url":"https://akohub.com"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customer_id\": 1234567890,\n  \"Event Type\": \"customer/profile_completed\",\n  \"Source\": \"\",\n  \"Change Type\": \"\",\n  \"Unique ID\": \"0b6f83d5a2c94e17b8d0526fa3c7194e\",\n  \"Event Date\": \"2026-06-30T11:22:05.000Z\",\n  \"Trigger Date\": \"2026-06-30T11:22:06.100Z\",\n  \"Metadata\": \"\"\n}"}],"_postman_id":"ec76201f-aa59-43f3-a788-850b0ee4e24e"},{"name":"customer/social_connected","id":"6e3a626d-9529-478b-99ff-f7c0f58190c8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://akohub.com","description":"<p>The customer connected a social account to their loyalty profile. One event per provider; fires\nwhether or not a social-login reward is configured.</p>\n<ul>\n<li><strong><code>Source</code></strong> / <strong><code>Change Type</code></strong> — both empty.</li>\n</ul>\n<h3 id=\"metadata\"><code>Metadata</code></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Always?</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>socialMedia</code></td>\n<td>✔</td>\n<td><code>facebook</code> · <code>instagram</code> · <code>google</code> · <code>line</code>.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","host":["akohub","com"],"query":[],"variable":[]}},"response":[{"id":"526ca000-17b8-4d57-a9c7-d9b5c525b3f7","name":"Social Connected","originalRequest":{"method":"GET","header":[],"url":"https://akohub.com"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customer_id\": 1234567890,\n  \"Event Type\": \"customer/social_connected\",\n  \"Source\": \"\",\n  \"Change Type\": \"\",\n  \"Unique ID\": \"8a2c50f9d7b13e64a0c85b27f4d10e93\",\n  \"Event Date\": \"2026-06-30T11:25:41.000Z\",\n  \"Trigger Date\": \"2026-06-30T11:25:42.000Z\",\n  \"Metadata\": \"{\\\"socialMedia\\\":\\\"line\\\"}\"\n}"}],"_postman_id":"6e3a626d-9529-478b-99ff-f7c0f58190c8"},{"name":"customer/signed_up","id":"649977e5-bfe2-4a87-a724-cbb5ed4a3037","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://akohub.com","description":"<p>A customer joined the loyalty program (fired on Shopify's <code>customers/create</code>). Fires <strong>whether or****not</strong> a signup reward is configured — any reward arrives separately on <code>rewards/granted</code>.</p>\n<ul>\n<li><p><strong><code>Source</code></strong> / <strong><code>Change Type</code></strong> — both empty.</p>\n</li>\n<li><p><strong><code>Metadata</code></strong> — empty (<code>\"\"</code>). Everything you need is <code>customer_id</code> + <code>Event Date</code>.</p>\n</li>\n</ul>\n","urlObject":{"protocol":"https","host":["akohub","com"],"query":[],"variable":[]}},"response":[{"id":"2be990cd-d8cb-49fc-9ef7-806c83590d10","name":"SIgnup","originalRequest":{"method":"GET","header":[],"url":"https://akohub.com"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customer_id\": 1234567890,\n  \"Event Type\": \"customer/signed_up\",\n  \"Source\": \"\",\n  \"Change Type\": \"\",\n  \"Unique ID\": \"d47b0e92c1a6538f7d2b04e9a1c86f35\",\n  \"Event Date\": \"2026-06-29T07:59:58.000Z\",\n  \"Trigger Date\": \"2026-06-29T07:59:59.300Z\",\n  \"Metadata\": \"\"\n}"}],"_postman_id":"649977e5-bfe2-4a87-a724-cbb5ed4a3037"},{"name":"customer/reviewed","id":"7eedb786-ee00-45d4-8f22-c81f08f2c6ae","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://akohub.com","description":"<p>The customer submitted a product review (via Judge.me). Fires on review <strong>creation</strong> only — an edit\nis not a new review — and only when the review carries a customer reference.</p>\n<ul>\n<li><strong><code>Source</code></strong> / <strong><code>Change Type</code></strong> — both empty.</li>\n</ul>\n<h3 id=\"metadata\"><code>Metadata</code></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Always?</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>reviewId</code></td>\n<td>✔</td>\n<td>Judge.me review id — string.</td>\n</tr>\n<tr>\n<td><code>rating</code></td>\n<td>–</td>\n<td>Star rating 1–5 — JSON number.</td>\n</tr>\n<tr>\n<td><code>productTitle</code></td>\n<td>–</td>\n<td>Title of the reviewed product.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","host":["akohub","com"],"query":[],"variable":[]}},"response":[{"id":"8f073308-97ad-45fc-b744-ea2c8b8edacf","name":"Reviewed","originalRequest":{"method":"GET","header":[],"url":"https://akohub.com"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customer_id\": 1234567890,\n  \"Event Type\": \"customer/reviewed\",\n  \"Source\": \"\",\n  \"Change Type\": \"\",\n  \"Unique ID\": \"c31d78b0e5a92f46d8b1c07a35e2946f\",\n  \"Event Date\": \"2026-07-02T03:14:09.000Z\",\n  \"Trigger Date\": \"2026-07-02T03:14:10.500Z\",\n  \"Metadata\": \"{\\\"reviewId\\\":\\\"555\\\",\\\"rating\\\":5,\\\"productTitle\\\":\\\"Ceramic Mug\\\"}\"\n}"}],"_postman_id":"7eedb786-ee00-45d4-8f22-c81f08f2c6ae"},{"name":"referral/succeeded","id":"4b84713e-4f9c-479b-8354-6f6ceca02803","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://akohub.com","description":"<p>A referral converted. <strong><code>Metadata.role</code></strong> tells you which side of the referral this event is about,\nand <code>customer_id</code> is always that side's customer:</p>\n<ul>\n<li><code>role = referred</code> — the referred friend signed up with a referral link. <code>customer_id</code> = the new\ncustomer.</li>\n<li><code>role = referrer</code> — a referred friend placed a qualifying order. <code>customer_id</code> = the referrer.</li>\n</ul>\n<p>Fires whether or not a referral reward is configured.</p>\n<ul>\n<li><strong><code>Source</code></strong> / <strong><code>Change Type</code></strong> — both empty.</li>\n</ul>\n<h3 id=\"metadata\"><code>Metadata</code></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Role</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>role</code></td>\n<td>both</td>\n<td><code>referred</code> or <code>referrer</code>.</td>\n</tr>\n<tr>\n<td><code>referrer</code></td>\n<td><code>referred</code></td>\n<td>Customer id of the person who referred them.</td>\n</tr>\n<tr>\n<td><code>referralCode</code></td>\n<td><code>referred</code></td>\n<td>The referral code / link id used.</td>\n</tr>\n<tr>\n<td><code>referredCustomer</code></td>\n<td><code>referrer</code></td>\n<td>Customer id of the friend who ordered.</td>\n</tr>\n<tr>\n<td><code>orderId</code></td>\n<td><code>referrer</code></td>\n<td>The qualifying order.</td>\n</tr>\n<tr>\n<td><code>orderName</code></td>\n<td><code>referrer</code></td>\n<td>Order name, e.g. <code>\"#1042\"</code>.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","host":["akohub","com"],"query":[],"variable":[]}},"response":[{"id":"fb4b41fc-f1ce-419e-9bcb-7357573b64b6","name":"referred","originalRequest":{"method":"GET","header":[],"url":"https://akohub.com"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customer_id\": 1234567890,\n  \"Event Type\": \"referral/succeeded\",\n  \"Source\": \"\",\n  \"Change Type\": \"\",\n  \"Unique ID\": \"1f6b39d072ac845e1b90d3f7c26a8054\",\n  \"Event Date\": \"2026-07-05T09:12:33.000Z\",\n  \"Trigger Date\": \"2026-07-05T09:12:34.200Z\",\n  \"Metadata\": \"{\\\"role\\\":\\\"referred\\\",\\\"referrer\\\":\\\"9876543210\\\",\\\"referralCode\\\":\\\"rfl_7Kq2\\\"}\"\n}"},{"id":"3b8cf2ac-5a97-4331-805c-fa5d7ba5f09d","name":"referrer","originalRequest":{"method":"GET","header":[],"url":"https://akohub.com"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customer_id\": 1234567890,\n  \"Event Type\": \"referral/succeeded\",\n  \"Source\": \"\",\n  \"Change Type\": \"\",\n  \"Unique ID\": \"94c0e7a2b5d831f6a0c47e29b3d5108f\",\n  \"Event Date\": \"2026-07-11T14:48:02.000Z\",\n  \"Trigger Date\": \"2026-07-11T14:48:03.600Z\",\n  \"Metadata\": \"{\\\"role\\\":\\\"referrer\\\",\\\"referredCustomer\\\":\\\"1234567890\\\",\\\"orderId\\\":\\\"6201234599999\\\",\\\"orderName\\\":\\\"#1042\\\"}\"\n}"}],"_postman_id":"4b84713e-4f9c-479b-8354-6f6ceca02803"},{"name":"redemption/created","id":"eed8648d-940c-4da9-a71a-290a0cd992ba","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://akohub.com","description":"<p>The customer <strong>spent</strong> points to get something. <strong><code>Metadata.redeemType</code></strong> says what:</p>\n<ul>\n<li><code>product</code> — redeemed a reward product;</li>\n<li><code>orderDiscount</code> — applied points as a discount at checkout;</li>\n<li><code>discountCode</code> — redeemed points for a discount code.</li>\n</ul>\n<p>The matching balance move fires separately as <code>points/changed</code> with <code>Change Type = redeem</code> — this is\nthe redemption lens, don't subscribe both to the same reaction.</p>\n<ul>\n<li><strong><code>Source</code></strong> / <strong><code>Change Type</code></strong> — both empty.</li>\n</ul>\n<h3 id=\"metadata\"><code>Metadata</code></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Always?</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>redeemType</code></td>\n<td>✔</td>\n<td><code>product</code> · <code>orderDiscount</code> · <code>discountCode</code>.</td>\n</tr>\n<tr>\n<td><code>points</code></td>\n<td>✔</td>\n<td>Points spent, <strong>positive</strong> — integer string.</td>\n</tr>\n<tr>\n<td><code>quantity</code></td>\n<td>product / discountCode</td>\n<td>How many units were redeemed — JSON number.</td>\n</tr>\n<tr>\n<td><code>orderId</code></td>\n<td>orderDiscount</td>\n<td>The order the points were applied to.</td>\n</tr>\n<tr>\n<td><code>rewardId</code></td>\n<td>–</td>\n<td>Id of the redeemed reward.</td>\n</tr>\n<tr>\n<td><code>productTitle</code></td>\n<td>–</td>\n<td>Product title of a redeemed reward product.</td>\n</tr>\n<tr>\n<td><code>variantTitle</code></td>\n<td>–</td>\n<td>Variant title of a redeemed reward product.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","host":["akohub","com"],"query":[],"variable":[]}},"response":[{"id":"d98cfd7b-c803-47ba-b116-326bdf44c52a","name":"Redeemed a reward product","originalRequest":{"method":"GET","header":[],"url":"https://akohub.com"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customer_id\": 1234567890,\n  \"Event Type\": \"redemption/created\",\n  \"Source\": \"\",\n  \"Change Type\": \"\",\n  \"Unique ID\": \"6d0a4c81b7e295f3a8d16b0c47e92385\",\n  \"Event Date\": \"2026-07-18T10:05:00.000Z\",\n  \"Trigger Date\": \"2026-07-18T10:05:01.000Z\",\n  \"Metadata\": \"{\\\"redeemType\\\":\\\"product\\\",\\\"points\\\":\\\"300\\\",\\\"quantity\\\":2,\\\"rewardId\\\":\\\"rwd_tee1\\\",\\\"productTitle\\\":\\\"Mystery Tee\\\",\\\"variantTitle\\\":\\\"Large / Black\\\"}\"\n}"},{"id":"2a0e0dcd-2e6c-48ae-85c9-0d9954a4e0b0","name":"Applied points at checkout","originalRequest":{"method":"GET","header":[],"url":"https://akohub.com"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customer_id\": 1234567890,\n  \"Event Type\": \"redemption/created\",\n  \"Source\": \"\",\n  \"Change Type\": \"\",\n  \"Unique ID\": \"b2f7c093a15e8d640b9c27a3f60d1584\",\n  \"Event Date\": \"2026-07-18T10:07:41.000Z\",\n  \"Trigger Date\": \"2026-07-18T10:07:42.300Z\",\n  \"Metadata\": \"{\\\"redeemType\\\":\\\"orderDiscount\\\",\\\"points\\\":\\\"50\\\",\\\"orderId\\\":\\\"6201234588888\\\"}\"\n}"}],"_postman_id":"eed8648d-940c-4da9-a71a-290a0cd992ba"},{"name":"redemption/updated","id":"1646ab80-e989-4672-8739-34138e3814ba","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://akohub.com","description":"<p>A redeemed item's status changed — the lifecycle of something the customer already redeemed. This\nis <strong>not</strong> a reward clawback (that's <code>rewards/revoked</code>).</p>\n<ul>\n<li><strong><code>Source</code></strong> / <strong><code>Change Type</code></strong> — both empty.</li>\n</ul>\n<h3 id=\"metadata\"><code>Metadata</code></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Always?</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>status</code></td>\n<td>✔</td>\n<td><code>used</code> (claimed in an order) · <code>returned</code> · <code>cancelled</code> · <code>refunded</code>.</td>\n</tr>\n<tr>\n<td><code>redeemType</code></td>\n<td>✔</td>\n<td><code>product</code> · <code>orderDiscount</code> · <code>discountCode</code>.</td>\n</tr>\n<tr>\n<td><code>quantity</code></td>\n<td>✔</td>\n<td>How many units changed status — JSON number.</td>\n</tr>\n<tr>\n<td><code>rewardId</code></td>\n<td>–</td>\n<td>Id of the redeemed reward.</td>\n</tr>\n<tr>\n<td><code>variantId</code></td>\n<td>–</td>\n<td>Variant id of the redeemed product — a full Shopify GID.</td>\n</tr>\n<tr>\n<td><code>productTitle</code> / <code>variantTitle</code></td>\n<td>–</td>\n<td>Titles of the redeemed product.</td>\n</tr>\n<tr>\n<td><code>orderId</code></td>\n<td>–</td>\n<td>The order involved in the status change.</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n<p>A refund's points return fires separately as <code>points/changed</code> with <code>Change Type = refund</code>.</p>\n</blockquote>\n","urlObject":{"protocol":"https","host":["akohub","com"],"query":[],"variable":[]}},"response":[{"id":"963731e2-5561-4dff-bcb7-dec303f143ac","name":"Redeemed a reward product","originalRequest":{"method":"GET","header":[],"url":"https://akohub.com"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customer_id\": 1234567890,\n  \"Event Type\": \"redemption/updated\",\n  \"Source\": \"\",\n  \"Change Type\": \"\",\n  \"Unique ID\": \"07e3a95c1b8df2604a7c05e93b1d8246\",\n  \"Event Date\": \"2026-07-20T08:31:17.000Z\",\n  \"Trigger Date\": \"2026-07-20T08:31:18.400Z\",\n  \"Metadata\": \"{\\\"status\\\":\\\"used\\\",\\\"redeemType\\\":\\\"product\\\",\\\"quantity\\\":1,\\\"rewardId\\\":\\\"rwd_tee1\\\",\\\"variantId\\\":\\\"gid://shopify/ProductVariant/44556677\\\",\\\"productTitle\\\":\\\"Mystery Tee\\\",\\\"variantTitle\\\":\\\"Large / Black\\\",\\\"orderId\\\":\\\"6201234599123\\\"}\"\n}"}],"_postman_id":"1646ab80-e989-4672-8739-34138e3814ba"}],"id":"e3636cab-fadd-477c-95a0-3d3e71c6ad36","description":"<p>These are <strong>events Ako sends</strong> <em><strong>to you</strong></em> through Shopify Flow when something happens in a<br />customer's loyalty program — not endpoints you call. You react to them inside Shopify Flow: send an<br />email, add a tag, POST to your own endpoint, or run an Ako action.</p>\n<p>Every topic in this folder arrives through <strong>one</strong> Shopify Flow trigger — <strong>\"Loyalty Event\"</strong><br />(provided by the Ako app). You tell the topics apart with the <strong><code>Event Type</code></strong> field. The requests<br />below are documentation only: each one shows the exact payload one topic delivers.</p>\n<h3 id=\"how-to-use-these-in-shopify-flow\">How to use these in Shopify Flow</h3>\n<ol>\n<li><p>In Shopify, open <strong>Flow → Create workflow</strong>.</p>\n</li>\n<li><p><strong>Trigger:</strong> choose <strong>Loyalty Event</strong> (from Ako).</p>\n</li>\n<li><p><strong>Condition:</strong> branch on the <strong><code>Event Type</code></strong> trigger field:</p>\n<ul>\n<li><p><strong>Equals</strong> <code>points/changed</code> → one specific topic.</p>\n</li>\n<li><p><strong>Starts with</strong> <code>points/</code> → a whole namespace (here, both <code>points/changed</code> and <code>points/expiring</code>).</p>\n</li>\n<li><p>Narrow further with <strong><code>Source</code></strong> (why it fired) and <strong><code>Change Type</code></strong> (how a balance moved).</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Action:</strong> any Flow action — Shopify's own (send email, add/remove tag, …), a third-party<br /> connector, or one of Ako's inbound actions (Award Points, Award Store Credit, Adjust VIP Tier,<br /> Custom Reward).</p>\n</li>\n</ol>\n<p><code>Event Type</code>, <code>Source</code>, and <code>Change Type</code> are the <strong>only</strong> fields a Flow condition can read<br />directly. Everything else rides in <strong><code>Metadata</code></strong> as a <strong>JSON string</strong>, which Flow conditions<br />cannot look inside.</p>\n<h3 id=\"getting-at-metadata--pick-one-of-three-patterns\">Getting at <code>Metadata</code> — pick one of three patterns</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Pattern</th>\n<th>Use it when</th>\n<th>How</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Flow actions only</strong></td>\n<td>You only need \"who + what happened\"</td>\n<td><code>customer_id</code> already populates Flow's Customer reference, so Shopify's and Ako's actions work with no parsing at all.</td>\n</tr>\n<tr>\n<td><strong>Run code</strong></td>\n<td>You need one value from <code>Metadata</code> inside the same workflow</td>\n<td>Add Flow's <strong>Run code</strong> action, <code>JSON.parse</code> the <code>Metadata</code> string, and return the fields you need as typed outputs. Later steps (conditions, email templates, other actions) can then use them like any other Flow variable.</td>\n</tr>\n<tr>\n<td><strong>Send HTTP request</strong></td>\n<td>You want the event in your own system</td>\n<td>Add Flow's <strong>Send HTTP request</strong> action and POST the trigger fields to your endpoint. Parse and route on your side. This is the recommended path for anything non-trivial — you get the whole payload and full control (fan-out, retries, your own storage).</td>\n</tr>\n</tbody>\n</table>\n</div><p>Insert the trigger fields into a Run-code input or an HTTP body with Flow's <strong>variable picker</strong> —<br /><code>Event Type</code>, <code>Source</code>, <code>Change Type</code>, <code>Unique ID</code>, <code>Event Date</code>, <code>Trigger Date</code>, <code>Metadata</code> are all<br />available there.</p>\n<blockquote>\n<p><strong>De-duplicate on</strong> <strong><code>Unique ID</code>****.</strong> Delivery is at-least-once. Compare <code>Unique ID</code> for equality<br />(don't parse it — it's an opaque hash). An empty <code>Unique ID</code> means \"do not de-dupe\". </p>\n</blockquote>\n<h3 id=\"subscribing--contact-us\">Subscribing — contact us</h3>\n<p>Flow Events are <strong>opt-in and enabled by Ako</strong>, not self-serve. A topic is delivered only when<br /><strong>both</strong> gates pass: (1) Flow Events is enabled for your shop, and (2) the specific topic is on your<br />shop's subscription list.</p>\n<p><strong>👉 To turn these on, contact your Ako account manager (or</strong> <strong><code>support@akohub.com</code>****)</strong> with your shop<br />domain and the topics you want.</p>\n<h3 id=\"payload-shape-same-for-every-topic\">Payload shape (same for every topic)</h3>\n<p>The trigger always carries these <strong>top-level fields</strong>; a field with no value is <code>\"\"</code>.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customer_id</code></td>\n<td>Numeric Shopify customer id — the <strong>subject</strong> of the event (populates Flow's Customer reference).</td>\n</tr>\n<tr>\n<td><code>Event Type</code></td>\n<td>The topic (<code>namespace/action</code>). Branch with <strong>Equals</strong> / <strong>Starts with</strong>.</td>\n</tr>\n<tr>\n<td><code>Source</code></td>\n<td>Why it fired. Populated on asset / reward topics; empty on pure-behavior topics, where the topic itself is the identity.</td>\n</tr>\n<tr>\n<td><code>Change Type</code></td>\n<td>How a balance moved. Only on balance-moving topics; empty everywhere else.</td>\n</tr>\n<tr>\n<td><code>Unique ID</code></td>\n<td>Opaque de-dup token (hash). Equality only; empty ⇒ don't de-dupe.</td>\n</tr>\n<tr>\n<td><code>Event Date</code></td>\n<td>ISO timestamp of when it happened — use this for customer-facing dates. On the scheduled topics (<code>\\*/expiring</code>, <code>customer/birthday</code>) it is the moment the reminder was <strong>due</strong>, so it does not move if delivery is delayed or retried.</td>\n</tr>\n<tr>\n<td><code>Trigger Date</code></td>\n<td>ISO timestamp of when the trigger was sent (after any queue delay).</td>\n</tr>\n<tr>\n<td><code>Metadata</code></td>\n<td>JSON <strong>string</strong> with everything else. <code>\"\"</code> when a topic has no extra fields (e.g. <code>customer/signed_up</code>).</td>\n</tr>\n</tbody>\n</table>\n</div><p><code>Source</code> and <code>Change Type</code> are <strong>promoted out</strong> of <code>Metadata</code> — they appear as top-level fields<br />only, never inside the JSON.</p>\n<p><strong><code>Source</code></strong> <strong>values</strong> — <code>order</code> · <code>signup</code> · <code>review</code> · <code>referral</code> · <code>referral_commission</code> ·<br /><code>birthday</code> · <code>vip_tier</code> · <code>ig_reels</code> · <code>claim</code> · <code>qr</code> · <code>flow</code> · <code>partner</code> · <code>manual</code> · <code>api</code><br />(plus <code>reward</code> as a fallback on <code>discount/created</code>).</p>\n<p><strong><code>Change Type</code></strong> <strong>values</strong> — <code>reward_grant</code> (earn) · <code>reward_revoke</code> (clawback) · <code>redeem</code> ·<br /><code>refund</code> · <code>expire</code> · <code>adjust</code> · <code>transfer</code> · <code>merge</code>. There is no separate \"earn\" type: earning on<br />an order is <code>reward_grant</code> with <code>Source = order</code>.</p>\n<h3 id=\"value-types\">Value types</h3>\n<p>Three rules, applied on every topic, so a field name never changes type between topics:<br /><strong>an amount is a decimal string</strong>, <strong>an id is a string</strong>, <strong>a count is a number</strong>. Parse amounts<br />with <code>Number()</code> before doing arithmetic.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Format / example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>points (<code>pointsChanged</code>, balances, <code>rewards[].value</code>, <code>expiringBalance</code>)</td>\n<td>integer string — <code>\"100\"</code>, <code>\"-40\"</code></td>\n</tr>\n<tr>\n<td>store credit (<code>amountChanged</code>, balances, <code>expiringBalance</code>)</td>\n<td>2dp money string — <code>\"10.50\"</code></td>\n</tr>\n<tr>\n<td>points spent (<code>points</code> on the redemption topics)</td>\n<td>integer string — <code>\"150\"</code></td>\n</tr>\n<tr>\n<td>discount <code>value</code>, <code>valueType = percentage</code></td>\n<td>number string — <code>\"10\"</code> (=10%), <code>\"12.5\"</code></td>\n</tr>\n<tr>\n<td>discount <code>value</code>, <code>valueType = fixed</code></td>\n<td>2dp money string — <code>\"10.00\"</code> (+ <code>currencyCode</code>)</td>\n</tr>\n<tr>\n<td>ids / codes (<code>rewardId</code>, <code>discountCode</code>, <code>orderId</code>, <code>reviewId</code>)</td>\n<td>string — <code>orderId</code> is always the bare numeric id, never a <code>gid://</code></td>\n</tr>\n<tr>\n<td><code>variantId</code> (<code>redemption/updated</code>)</td>\n<td>string — a full Shopify GID, e.g. <code>\"gid://shopify/ProductVariant/123\"</code></td>\n</tr>\n<tr>\n<td>counts (<code>quantity</code>) and <code>rating</code></td>\n<td>number — neither an amount nor an id</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"two-lenses--never-subscribe-both-to-the-same-reaction\">Two lenses — never subscribe both to the same reaction</h3>\n<p>A reward grant emits <strong>two</strong> views of the same fact:</p>\n<ul>\n<li><p>the <strong>reward lens</strong> — <code>rewards/granted</code>: type-agnostic, one bundled event listing every reward in<br />  the grant;</p>\n</li>\n<li><p>the <strong>asset lens</strong> — <code>points/changed</code>, <code>store_credit/changed</code>, <code>discount/created</code>: one event per<br />  balance/asset that moved.</p>\n</li>\n</ul>\n<p>They share a <code>correlationId</code> in <code>Metadata</code> so you can join them. <strong>Pick one lens per automation</strong> —<br />subscribing both to the same action double-fires. Use the reward lens for \"any reward\" automations,<br />the asset lens for \"a balance moved\".</p>\n","_postman_id":"e3636cab-fadd-477c-95a0-3d3e71c6ad36"}]}