{"info":{"_postman_id":"790565f6-c88f-42a6-a6a8-5bd86849cda1","name":"CreditsYard","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"16161206","collectionId":"790565f6-c88f-42a6-a6a8-5bd86849cda1","publishedId":"TzzHjXVw","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-08-26T22:59:02.000Z"},"item":[{"name":"Customer","item":[{"name":"Get customers","id":"14f78292-557d-4b90-8f39-9ee3d60f19ed","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":"https://creditsyard.com/api/common/customers/index","description":"<h5>Header</h5>\n\n<table><tbody><tr><td><div>X-Shop-Api-Key</div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"X-Shop-Api-Key\": \"SgdIFpTDkUDa1Wm4N93RM\"</b><br />Merchant's Shop API key (required)</div><div><div><div><div></div></div></div><div></div></div></td></tr></tbody></table>\n\n<h5>Body</h5>\n\n<table><tbody><tr><td><div>start_date <b>(optional)</b></div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"start_date\": \"2024-01-01\"<br /></b>(Optional) Retrieve customers who have credits created starting from \"start_date\"</div><div><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>end_date <b>(optional)</b></div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"end_date\": \"2024-01-31\"<br /></b>(Optional) Retrieve customers who have credits created between \"start_date\" and \"end_date\"</div><div><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>page <b>(integer)</b></div><div><div><div><div></div></div></div><div></div></div></td><td><div>Used to specify the page number for paginated results.</div><div><div><div><div></div></div></div><div></div></div></td></tr></tbody></table>","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-Shop-Api-Key  "}]},"isInherited":true,"source":{"_postman_id":"790565f6-c88f-42a6-a6a8-5bd86849cda1","id":"790565f6-c88f-42a6-a6a8-5bd86849cda1","name":"CreditsYard","type":"collection"}},"urlObject":{"protocol":"https","path":["api","common","customers","index"],"host":["creditsyard","com"],"query":[],"variable":[]}},"response":[{"id":"050e8fd1-6072-488f-b3f5-d1f0cd792eea","name":"Example","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"X-Shop-Api-Key","value":"SgdIFpTDkUDa1Wm4N93RMIzmD","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"customer_email\": \"customer@example.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://creditsyard.com/api/common/customers/index"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"data\": [\r\n        {\r\n            \"id\": \"7204059185435\",\r\n            \"email\": \"customer@domain.com\",\r\n            \"name\": \"Customer name\",\r\n            \"balance\": 100,\r\n            \"activity\": [\r\n                {\r\n                    \"amount\": 100,\r\n                    \"reason\": null,\r\n                    \"order_name\": null,\r\n                    \"date\": \"09/11/2024\"\r\n                },\r\n            ]\r\n        }\r\n    ],\r\n    \"pagination\": {\r\n        \"current_page\": 1,\r\n        \"last_page\": 13,\r\n        \"per_page\": 10,\r\n        \"total\": 130,\r\n        \"next_page_url\": \"https://creditsyard.com/api/common/customers/index?page=2\",\r\n        \"prev_page_url\": null\r\n    }\r\n}"}],"_postman_id":"14f78292-557d-4b90-8f39-9ee3d60f19ed"},{"name":"Find customer","id":"7d886a31-99d2-47ad-80a2-ed56352f719d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":"https://creditsyard.com/api/common/customers/get","description":"<h5>Header</h5>\n<table>\n    <tbody>\n        <tr>\n            <td>X-Shop-Api-Key</td>\n            <td><b>\"X-Shop-Api-Key\": \"SgdIFpTDkUDa1Wm4N93RM\"</b><br /> Merchant's Shop API key (required)</td>\n        </tr>\n    </tbody>\n</table>\n\n<h5>Body</h5>\n<table>\n    <tbody>\n        <tr>\n            <td>customer_id</td>\n            <td><b>\"customer_id\": \"5307768438942\"</b><br />Customer's id on merchant's store (required if customer_email is not set)</td>\n        </tr>\n        <tr>\n            <td>customer_email</td>\n            <td><b>\"customer_email\": \"customer@example.com\"</b><br />Customer's email (required if customer_id is not set)</td>\n        </tr>\n    </tbody>\n</table>","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-Shop-Api-Key  "}]},"isInherited":true,"source":{"_postman_id":"790565f6-c88f-42a6-a6a8-5bd86849cda1","id":"790565f6-c88f-42a6-a6a8-5bd86849cda1","name":"CreditsYard","type":"collection"}},"urlObject":{"protocol":"https","path":["api","common","customers","get"],"host":["creditsyard","com"],"query":[],"variable":[]}},"response":[{"id":"914fbf8f-41a5-41f5-92fe-12dce354a755","name":"Example","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"X-Shop-Api-Key","value":"SgdIFpTDkUDa1Wm4N93RMIzmD","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"customer_email\": \"customer@example.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://creditsyard.com/api/common/customers/get"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"id\": \"5307768438942\",\r\n    \"email\": \"customer@example.com\",\r\n    \"balance\": 300,\r\n    \"tags\": [\"VIP\"],\r\n    \"activity\": [\r\n        {\r\n            \"amount\": 100,\r\n            \"reason\": \"Bag exchange\",\r\n            \"order_id\": null,\r\n            \"date\": \"09/01/2021\"\r\n        },\r\n        {\r\n            \"amount\": 200,\r\n            \"reason\": \"Refund for order replacement\",\r\n            \"order_id\": null,\r\n            \"date\": \"07/18/2021\"\r\n        }\r\n    ]\r\n}"}],"_postman_id":"7d886a31-99d2-47ad-80a2-ed56352f719d"},{"name":"Update customer","id":"cf6d07af-b1f9-4c47-bcd4-a0d43fe1a3dc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":""},"url":"https://creditsyard.com/api/common/customers/update","description":"<h5>Header</h5>\n\n<table><tbody><tr><td><div>X-Shop-Api-Key</div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"X-Shop-Api-Key\": \"SgdIFpTDkUDa1Wm4N93RM\"</b><br />Merchant's Shop API key (required)</div><div><div><div><div></div></div></div><div></div></div></td></tr></tbody></table>\n\n<h5>Body</h5>\n\n<table><tbody><tr><td><div>customer_id</div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"customer_id\": \"5307768438942\"</b><br />Customer's id on merchant's store (required if customer_email is not set)</div><div><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>customer_email</div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"customer_email\": \"customer@example.com\"</b><br />Customer's email (required if customer_id is not set)</div><div><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>name</div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"name\": \"James\"</b><br />Customer's name</div><div><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>custom_shipping_value</div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"custom_shipping_value\": \"10\"</b><br />Custom shipping cost</div><div><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>tags</div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>[\"tag1\", \"tag2\"]</b><br />Customer's tags</div><div><div><div><div></div></div></div><div></div></div></td></tr></tbody></table>","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-Shop-Api-Key  "}]},"isInherited":true,"source":{"_postman_id":"790565f6-c88f-42a6-a6a8-5bd86849cda1","id":"790565f6-c88f-42a6-a6a8-5bd86849cda1","name":"CreditsYard","type":"collection"}},"urlObject":{"protocol":"https","path":["api","common","customers","update"],"host":["creditsyard","com"],"query":[],"variable":[]}},"response":[{"id":"307e7b70-20a4-43c8-bccb-ed479c81b2b1","name":"Example","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"X-Shop-Api-Key","value":"SgdIFpTDkUDa1Wm4N93RMIzmD","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"customer_email\": \"customer@example.com\",\r\n    \"name\": \"James\",\r\n    \"tags\": [\"tag1\", \"tag2\"]\r\n}","options":{"raw":{"language":"json"}}},"url":"https://creditsyard.com/api/common/customers/update"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"id\": \"5307768438942\",\r\n    \"email\": \"customer@example.com\",\r\n    \"name\": \"James\",\r\n    \"tags\": [\"tag1\", \"tag2\"]\r\n}"}],"_postman_id":"cf6d07af-b1f9-4c47-bcd4-a0d43fe1a3dc"},{"name":"Update balance","id":"290790b3-b59e-4d38-ba69-353202554b74","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":""},"url":"https://creditsyard.com/api/common/customers/balance/update","description":"<h5>Header</h5>\n\n<table><tbody><tr><td><div>X-Shop-Api-Key</div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"X-Shop-Api-Key\": \"SgdIFpTDkUDa1Wm4N93RM\"</b><br />Merchant's Shop API key (required)</div><div><div><div><div></div></div></div><div></div></div></td></tr></tbody></table>\n\n<h5>Body</h5>\n\n<table><tbody><tr><td><div>customer_id</div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"customer_id\": \"21324646456\"<br /></b>Customer's id on Shopify</div><div><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>customer_email</div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"customer_email\": \"customer@example.com\"</b><br />Customer's email (required)</div><div><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>balance</div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"balance\": 100</b><br />The final balance the customer should have, we will do the transaction adjustment on our end (required)</div><div><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>reason</div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"reason\": \"Bag exchange\"</b><br />The reason for the transaction - visible to you and your customer (optional)</div><div><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>send_email_notification</div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"send_email_notification\": 0</b><br />If set to 1, an email notification will be sent to the customer. (optional - default 0)</div><div><div><div><div></div></div></div><div></div></div></td></tr></tbody></table>","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-Shop-Api-Key  "}]},"isInherited":true,"source":{"_postman_id":"790565f6-c88f-42a6-a6a8-5bd86849cda1","id":"790565f6-c88f-42a6-a6a8-5bd86849cda1","name":"CreditsYard","type":"collection"}},"urlObject":{"protocol":"https","path":["api","common","customers","balance","update"],"host":["creditsyard","com"],"query":[],"variable":[]}},"response":[{"id":"16ec42fd-3e49-4830-9d46-f149caacaa5c","name":"Update Balance","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"X-Shop-Api-Key","value":"SgdIFpTDkUDa1Wm4N93RMIzmD","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"customer_email\": \"customer@example.com\",\r\n    \"balance\": 100,\r\n    \"reason\": \"Bag exchange\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://creditsyard.com/api/common/customers/balance/update"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":""}],"_postman_id":"290790b3-b59e-4d38-ba69-353202554b74"}],"id":"09391027-1307-4e91-8edb-312705032cb0","description":"<h3 id=\"shopify-liquid-variables\"><strong>Shopify liquid Variables:</strong></h3>\n<ul>\n<li>customer.metafields.creditsyard.store_credit_balance</li>\n<li>customer.metafields.creditsyard.store_credit_last_updated</li>\n</ul>\n","_postman_id":"09391027-1307-4e91-8edb-312705032cb0","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-Shop-Api-Key  "}]},"isInherited":true,"source":{"_postman_id":"790565f6-c88f-42a6-a6a8-5bd86849cda1","id":"790565f6-c88f-42a6-a6a8-5bd86849cda1","name":"CreditsYard","type":"collection"}}},{"name":"Credits","item":[{"name":"Checkout","id":"a283b582-5425-4340-8bf6-0981a2f92690","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":""},"url":"https://creditsyard.com/api/common/credits/checkout","description":"<h5>Header</h5>\n<table>\n    <tbody>\n        <tr>\n            <td>X-Shop-Api-Key</td>\n            <td><b>\"X-Shop-Api-Key\": \"SgdIFpTDkUDa1Wm4N93RM\"</b><br /> Merchant's Shop API key (required)</td>\n        </tr>\n    </tbody>\n</table>\n\n<h5>Body</h5>\n<table>\n    <tbody>\n        <tr>\n            <td>customer_email</td>\n            <td><b>\"customer_email\": \"customer@example.com\"</b><br />Customer's email (required if customer_id is not set)</td>\n        </tr>\n        <tr>\n            <td>cart</td>\n            <td><b>Shopify cart object for the active cart session (required)</b>\n<pre>\"cart\": {\n  \"items\": [\n    {\n      \"product_id\": 6734872805534,\n      \"variant_id\": 39987738050718,\n      \"quantity\": 1,\n      \"line_price\": 1000,\n      \"final_line_price\": 1000,\n      \"original_line_price\": 1000,\n      \"price\": 1000\n    }\n  ],\n  \"original_total_price\": \"1000\"\n}</pre>\n</td>\n        </tr>\n        <tr>\n            <td>amount</td>\n            <td><b>\"amount\": \"10\"</b><br />A specific credit amount to be used (optional)</td>\n        </tr>\n        <tr>\n            <td>free_shipping</td>\n            <td><b>\"free_shipping\": 0</b><br />Force apply free shipping to the order (optional)</td>\n        </tr>\n    </tbody>\n</table>","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-Shop-Api-Key  "}]},"isInherited":true,"source":{"_postman_id":"790565f6-c88f-42a6-a6a8-5bd86849cda1","id":"790565f6-c88f-42a6-a6a8-5bd86849cda1","name":"CreditsYard","type":"collection"}},"urlObject":{"protocol":"https","path":["api","common","credits","checkout"],"host":["creditsyard","com"],"query":[],"variable":[]}},"response":[{"id":"5bf9f134-157d-4707-810b-a87c68d25c33","name":"Minimal Cart Example","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"X-Shop-Api-Key","value":"SgdIFpTDkUDa1Wm4N93RMIzmD","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"customer_email\": \"customer@example.com\",\r\n    \"cart\": {\r\n\t\t\"items\": [\r\n\t\t\t{\r\n\t\t\t\t\"quantity\": 1,\r\n\t\t\t\t\"variant_id\": 37485497286814\r\n\t\t\t}\r\n\t\t],\r\n\t\t\"original_total_price\": 10000\r\n\t}\r\n}","options":{"raw":{"language":"json"}}},"url":"https://creditsyard.com/api/common/credits/checkout"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"order_id\": 12343543545,\n    \"discount_code\": null,\n    \"checkout_url\": \"https://mystore.myshopify.com/42727604382/invoices/650541c7d13622805805ad196f837f83\"\n}"},{"id":"934b95d9-c469-4175-96ff-49b223272e17","name":"Full Cart Example","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"X-Shop-Api-Key","value":"SgdIFpTDkUDa1Wm4N93RMIzmD","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"customer_email\": \"customer@example.com\",\r\n  \"cart\": {\r\n    \"attributes\": {},\r\n    \"cart_level_discount_applications\": [],\r\n    \"currency\": \"USD\",\r\n    \"item_count\": 1,\r\n    \"items\": [\r\n      {\r\n        \"discounted_price\": 1000,\r\n        \"discounts\": [],\r\n        \"final_line_price\": 1000,\r\n        \"final_price\": 1000,\r\n        \"gift_card\": false,\r\n        \"grams\": 0,\r\n        \"handle\": \"shoelaces-for-sneakers-running-shoes\",\r\n        \"id\": 39987738050718,\r\n        \"image\": \"https://cdn.shopify.com/s/files/1/0427/2760/4382/products/71GUhc4WKYL._AC_UY535.jpg?v=1622237294\",\r\n        \"key\": \"39987738050718:3bd43af7ae03ec482f7de5d80e1e5bb4\",\r\n        \"line_level_discount_allocations\": [],\r\n        \"line_level_total_discount\": 0,\r\n        \"line_price\": 1000,\r\n        \"options_with_values\": [\r\n          {\r\n            \"name\": \"Title\",\r\n            \"value\": \"Default Title\"\r\n          }\r\n        ],\r\n        \"original_line_price\": 1000,\r\n        \"original_price\": 1000,\r\n        \"price\": 1000,\r\n        \"product_description\": \"\",\r\n        \"product_has_only_default_variant\": true,\r\n        \"product_id\": 6734872805534,\r\n        \"product_title\": \"Shoelaces for Sneakers/Running Shoes\",\r\n        \"product_type\": \"\",\r\n        \"properties\": null,\r\n        \"quantity\": 1,\r\n        \"requires_shipping\": true,\r\n        \"sku\": \"\",\r\n        \"taxable\": true,\r\n        \"title\": \"Shoelaces for Sneakers/Running Shoes\",\r\n        \"total_discount\": 0,\r\n        \"url\": \"/products/shoelaces-for-sneakers-running-shoes?variant=39987738050718\",\r\n        \"variant_id\": 39987738050718,\r\n        \"variant_options\": [\r\n          \"Default Title\"\r\n        ],\r\n        \"variant_title\": null,\r\n        \"vendor\": \"FashionYard\"\r\n      }\r\n    ],\r\n    \"items_subtotal_price\": 1000,\r\n    \"note\": null,\r\n    \"original_total_price\": 1000,\r\n    \"requires_shipping\": true,\r\n    \"token\": \"a08a17152343e802b021ecc61a76a9f4\",\r\n    \"total_discount\": 0,\r\n    \"total_price\": 1000,\r\n    \"total_weight\": 0\r\n  }\r\n}","options":{"raw":{"language":"json"}}},"url":"https://creditsyard.com/api/common/credits/checkout"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"order_id\": 12343543545,\n    \"discount_code\": null,\n    \"checkout_url\": \"https://mystore.myshopify.com/42727604382/invoices/650541c7d13622805805ad196f837f83\"\n}"}],"_postman_id":"a283b582-5425-4340-8bf6-0981a2f92690"},{"name":"Adjust credit","id":"5ce548e4-0e29-4b7a-b699-9c9a2d74b758","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":""},"url":"https://creditsyard.com/api/common/credits/adjust","description":"<h5>Header</h5>\n\n<table><tbody><tr><td><div>X-Shop-Api-Key</div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"X-Shop-Api-Key\": \"SgdIFpTDkUDa1Wm4N93RM\"</b><br />Merchant's Shop API key (required)</div><div><div><div><div></div></div></div><div></div></div></td></tr></tbody></table>\n\n<h5>Body</h5>\n\n<table><tbody><tr><td><div>customer_email</div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"customer_email\": \"customer@example.com\"</b><br />Customer's email to add/deduct store credit store to (required)</div><div><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>customer_id</div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"customer_id\": \"21324646456\"</b><br />Customer's id on Shopify (optional)</div><div><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>amount</div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"amount\": 10</b><br />Amount of credit to add or subtract from customer's account (required)</div><div><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>reason</div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"reason\": \"Bag exchange\"</b><br />The reason for this transaction - visible to you and your customer (optional)</div><div><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>send_email_notification</div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"send_email_notification\": 0</b><br />If set to 1, an email notification will be sent to the customer. (optional - default 0)</div><div><div><div><div></div></div></div><div></div></div></td></tr></tbody></table>","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-Shop-Api-Key  "}]},"isInherited":true,"source":{"_postman_id":"790565f6-c88f-42a6-a6a8-5bd86849cda1","id":"790565f6-c88f-42a6-a6a8-5bd86849cda1","name":"CreditsYard","type":"collection"}},"urlObject":{"protocol":"https","path":["api","common","credits","adjust"],"host":["creditsyard","com"],"query":[],"variable":[]}},"response":[{"id":"a63c47a4-a8bd-403e-8f11-53976787be72","name":"Add Credit Example","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"X-Shop-Api-Key","value":"SgdIFpTDkUDa1Wm4N93RMIzmD","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"customer_email\": \"customer@example.com\",\r\n    \"amount\": 10,\r\n    \"reason\": \"Bag exchange\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://creditsyard.com/api/common/credits/adjust"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"success\",\n    \"data\": {\n        \"amount\": 10,\n        \"reason\": \"Bag exchange\",\n        \"date\": \"05/20/2025\",\n        \"created_at\": \"2025-05-20 13:49:01\",\n        \"customer\": {\n            \"id\": \"6032639590632\",\n            \"email\": \"john.doe@merchantyard.com\"\n        }\n    }\n}"},{"id":"5e764b3e-2575-451a-a21c-c4b236941051","name":"Deduct Credit Example","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"X-Shop-Api-Key","value":"SgdIFpTDkUDa1Wm4N93RMIzmD","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"customer_email\": \"customer@example.com\",\r\n    \"amount\": -10,\r\n    \"reason\": \"Store Credit Used\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://creditsyard.com/api/common/credits/adjust"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"success\",\n    \"data\": {\n        \"amount\": -10,\n        \"reason\": \"Store Credit Used\",\n        \"date\": \"05/20/2025\",\n        \"created_at\": \"2025-05-20 13:49:01\",\n        \"customer\": {\n            \"id\": \"6032639590632\",\n            \"email\": \"john.doe@merchantyard.com\"\n        }\n    }\n}"}],"_postman_id":"5ce548e4-0e29-4b7a-b699-9c9a2d74b758"}],"id":"3d05dc61-816b-459c-81eb-d99e071ed77e","description":"<p>This API allows you to programmatically generate a checkout link with store credit applied. Additionally, it enables you to add or deduct store credit from customer accounts.</p>\n","_postman_id":"3d05dc61-816b-459c-81eb-d99e071ed77e","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-Shop-Api-Key  "}]},"isInherited":true,"source":{"_postman_id":"790565f6-c88f-42a6-a6a8-5bd86849cda1","id":"790565f6-c88f-42a6-a6a8-5bd86849cda1","name":"CreditsYard","type":"collection"}}},{"name":"Orders","item":[{"name":"Get order","id":"24ea3d01-cc43-4937-95dd-a5cfef9cdb79","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":"https://creditsyard.com/api/common/orders/get","description":"<h5>Header</h5>\n\n<p><br /><br /></p><table><tbody><tr><td><div>X-Shop-Api-Key</div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"X-Shop-Api-Key\": \"SgdIFpTDkUDa1Wm4N93RM\"</b><br />Merchant's Shop API key (required)</div><div><div><div><div></div></div></div><div></div></div></td></tr></tbody></table>\n\n<h5>Body</h5>\n\n<table><tbody><tr><td><div>order_id</div><div><div><div><div></div></div></div><div></div></div></td><td><div><b>\"order_id\": \"5307768438942\"</b><br />Order id on Shopify</div><div><div><div><div></div></div></div><div></div></div></td></tr></tbody></table>","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-Shop-Api-Key  "}]},"isInherited":true,"source":{"_postman_id":"790565f6-c88f-42a6-a6a8-5bd86849cda1","id":"790565f6-c88f-42a6-a6a8-5bd86849cda1","name":"CreditsYard","type":"collection"}},"urlObject":{"protocol":"https","path":["api","common","orders","get"],"host":["creditsyard","com"],"query":[],"variable":[]}},"response":[{"id":"d46e289c-36f7-4c53-8ccc-b68d6e204bb4","name":"Example","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"X-Shop-Api-Key","value":"SgdIFpTDkUDa1Wm4N93RMIzmD","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"order_id\": \"5965808074984\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://creditsyard.com/api/common/orders/get"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\r\n    \"order_id\": \"5965808074984\",\r\n    \"customer_email\": \"john.doe@merchantyard.com\",\r\n    \"customer_name\": \"John Doe\",\r\n    \"transactions\": [\r\n        {\r\n            \"amount\": -55,\r\n            \"reason\": \"Credit used for order #1467\",\r\n            \"type\": \"credit_used\",\r\n            \"date\": \"09/30/2023\"\r\n        }\r\n    ]\r\n}"}],"_postman_id":"24ea3d01-cc43-4937-95dd-a5cfef9cdb79"}],"id":"05fdd097-9b94-4d12-924c-92724321fafe","_postman_id":"05fdd097-9b94-4d12-924c-92724321fafe","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-Shop-Api-Key  "}]},"isInherited":true,"source":{"_postman_id":"790565f6-c88f-42a6-a6a8-5bd86849cda1","id":"790565f6-c88f-42a6-a6a8-5bd86849cda1","name":"CreditsYard","type":"collection"}}}],"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-Shop-Api-Key  "}]}},"event":[{"listen":"prerequest","script":{"id":"57140878-f306-4c4f-895f-67bfd7273824","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"aa8558a6-4756-4974-aa45-42b1484a84ab","type":"text/javascript","exec":[""]}}]}