{"id":15297122,"url":"https://github.com/revolunet/sellsy-proxy","last_synced_at":"2026-01-06T01:33:20.966Z","repository":{"id":65494349,"uuid":"95901400","full_name":"revolunet/sellsy-proxy","owner":"revolunet","description":"Basic Sellsy API proxy for full client side apps.","archived":false,"fork":false,"pushed_at":"2017-10-12T21:55:14.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T06:58:55.217Z","etag":null,"topics":["api","cors","nodejs","sellsy","zeit"],"latest_commit_sha":null,"homepage":"https://github.com/revolunet/sellsy-proxy","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/revolunet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-30T15:28:24.000Z","updated_at":"2022-02-07T13:23:27.000Z","dependencies_parsed_at":"2023-01-25T21:25:11.404Z","dependency_job_id":null,"html_url":"https://github.com/revolunet/sellsy-proxy","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revolunet%2Fsellsy-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revolunet%2Fsellsy-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revolunet%2Fsellsy-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revolunet%2Fsellsy-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/revolunet","download_url":"https://codeload.github.com/revolunet/sellsy-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245467614,"owners_count":20620216,"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":["api","cors","nodejs","sellsy","zeit"],"created_at":"2024-09-30T19:15:14.624Z","updated_at":"2026-01-06T01:33:15.919Z","avatar_url":"https://github.com/revolunet.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sellsy proxy\n\nBasic Sellsy API proxy; add CORS for full client side apps.\n\n[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/revolunet/sellsy-proxy\u0026env=CONSUMER_KEY\u0026env=CONSUMER_SECRET)\n\nServer is deployed with `consumer` oauth keys and client must give its sellsy oauth token in each request.\n\n## Usage\n\nStart the server with all the consumer API keys as environment variables\n\n```sh\nset CONSUMER_KEY=\"xxx\";\nset CONSUMER_SECRET=\"xxx\";\nnpm start\n```\n\n## Call Sellsy API from your browser\n\nThere are two ways to query the sellsy API :\n\n### Default : \"transparent\" proxy\n\nReplace the default sellsy API endpoint with your proxy URL and it will relay all calls.\n\nAlso works with [node-sellsy](https://github.com/revolunet/node-sellsy) `endPoint` parameter.\n\n### via /GET\n\nUsing `GET` method, pass `method` and `params` url query parameters, following Sellsy API docs.\n\n`params` must be URL encoded.\n\nAlso add oauth headers for the proxy :\n\n```js\n// call to the API\nconst makeProxyRequest = ({ endPoint, method, params }) =\u003e {\n  // create the proxy URL\n  var urlParams = encodeURIComponent(params);\n  // build url for the proxy\n  var url = `${endPoint}?method=${method}\u0026params=${urlParams}`;\n  // use native fetch API and convert to JSON\n  var request = new Request(url, {\n    headers: new Headers({\n      'X-USER-TOKEN': 'aaa',\n      'X-USER-SECRET': 'bbb',\n    }),\n    mode: 'cors'\n  });\n  return fetch(request).then(r =\u003e r.json()).catch(e =\u003e {\n    console.log('e', e);\n    throw e;\n  });\n};\n\nmakeProxyRequest({\n  endPoint: 'http://127.0.0.1:8282',\n  method: 'Document.getList',\n  params: JSON.stringify({\n    doctype: 'invoice',\n    search: {\n      contains: 'test',\n    },\n  }),\n}).then(data =\u003e {\n  console.log(data);\n});\n```\n\nYou'll get the raw result from the Sellsy API.\n\nDemo : https://codesandbox.io/s/wy45kppq0k\n\n\n## See also\n\n - [node-sellsy](http://github.com/revolunet/node-sellsy)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevolunet%2Fsellsy-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frevolunet%2Fsellsy-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevolunet%2Fsellsy-proxy/lists"}