{"id":15293404,"url":"https://github.com/akashanand708/pwinty-api","last_synced_at":"2026-02-13T09:04:27.310Z","repository":{"id":65478478,"uuid":"157049164","full_name":"akashanand708/pwinty-api","owner":"akashanand708","description":"Pwinty API provides all api end points to communicate with latest v3.0 Pwinty API. This can be used in frontend (ReactJs, ReactNative) and backend( Node.js )","archived":false,"fork":false,"pushed_at":"2018-11-11T18:45:46.000Z","size":8,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-13T14:07:11.213Z","etag":null,"topics":["javascript","jquery","nodejs","nodejs-server","pwinty","pwinty-api","react-native","reactjs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akashanand708.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-11T05:06:15.000Z","updated_at":"2020-07-17T15:13:34.000Z","dependencies_parsed_at":"2023-01-25T07:45:16.560Z","dependency_job_id":null,"html_url":"https://github.com/akashanand708/pwinty-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akashanand708%2Fpwinty-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akashanand708%2Fpwinty-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akashanand708%2Fpwinty-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akashanand708%2Fpwinty-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akashanand708","download_url":"https://codeload.github.com/akashanand708/pwinty-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248724638,"owners_count":21151561,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","jquery","nodejs","nodejs-server","pwinty","pwinty-api","react-native","reactjs"],"created_at":"2024-09-30T16:47:59.435Z","updated_at":"2026-02-13T09:04:22.275Z","avatar_url":"https://github.com/akashanand708.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pwinty-api\n[Pwinty API](http://pwinty.com/api/) provides all api end points to communicate with  latest v3.0 Pwinty API. This can be used in frontend (ReactJs, ReactNative) and backend( Node.js )\n\n# Installation\n`$ npm install pwinty-api`\n\n# Note\nWe don't need to pass **Sandbox API URL** or **Live API URL** explictly,\nIf server will run in **development mode** , it will use **Sandbox API URL**,\nin **production mode**, it will use **Live API URL**.\n\nIn **development mode** , we just need to use **Sandbox merchantId/Sandbox-Rest api key**,and \nin **production mode** , we just need to use **Live merchantId/Sandbox-Rest api key**.\n\nWe need to set environment variable for this.\n```\nIn package.json\n\"scripts\": {\n    \"start\": \"NODE_ENV=development nodemon ./src/app.js --exec babel-node\",\n    \"build\": \"babel src -d dist\",\n    \"serve\": \"NODE_ENV=production node dist/app.js\"\n  },\n```\n\n# Quick Start\nInitialize Pwinty with merchant_id and api_key\n```\n  import { Pwinty } from 'pwinty-api/lib';\n  \n  let pwinty = new Pwinty(\"merchant_id\", 'api_key');\n ```\n  ### Create order\n\n```\n\tlet orderParams = {\n\t\tcountryCode: 'GB',\n\t\trecipientName: '',\n\t\taddress1: '',\n\t\taddressTownOrCity: '',\n\t\tstateOrCounty: '',\n\t\tpostalOrZipCode: '',\n\t\tpreferredShippingMethod: 'Express'\n\t};\n\tpwinty.createOrder(orderParams)\n\t\t.then((response) =\u003e {\n\t\t\tconsole.log(response.data);\n\t\t})\n\t\t.catch((err) =\u003e {\n\t\t\tconsole.log(\"ERROR.....\", err.response.data.statusTxt);\n\t\t});\n    \n ```\n    \n  ### Add image to order\n \n ```\n\tlet addImageParamsObject = {\n\t\tsku: 'ART-PRI-HPG-20X28-PRODIGI_GB',\n\t\turl: '\u003cImage URL\u003e',\n\t\tcopies: 3,\n\t\tsizing: 'Crop'\n\t};\n\tpwinty.addImageToOrder(\u003corderId\u003e,\u003caddImageParams\u003e)\n\t\t.then((response) =\u003e {\n\t\t\tconsole.log(response.data);\n\t\t})\n\t\t.catch((err) =\u003e {\n\t\t\tconsole.log(\"ERROR.....\", err.response.data.statusTxt);\n\t\t});\n    \n ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakashanand708%2Fpwinty-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakashanand708%2Fpwinty-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakashanand708%2Fpwinty-api/lists"}