{"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":"Adjust customer points","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":[{"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\": \"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"}],"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"}],"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<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"}]}