{"id":18732327,"url":"https://github.com/screenstaring/big_commerce-management_api","last_synced_at":"2026-02-12T01:14:42.626Z","repository":{"id":257999321,"uuid":"872150866","full_name":"ScreenStaring/big_commerce-management_api","owner":"ScreenStaring","description":"v3 API client for BigCommerce's REST Management API","archived":false,"fork":false,"pushed_at":"2024-11-02T17:36:36.000Z","size":63,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-26T12:51:09.359Z","etag":null,"topics":["bigcommerce","bigcommerce-api","e-commerce","e-commerce-platform","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/ScreenStaring.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-13T22:50:37.000Z","updated_at":"2024-12-14T06:54:33.000Z","dependencies_parsed_at":"2024-11-02T17:25:13.602Z","dependency_job_id":"6c7e8935-cf57-4859-8a1b-5455ca91cae9","html_url":"https://github.com/ScreenStaring/big_commerce-management_api","commit_stats":null,"previous_names":["screenstaring/big_commerce-management_api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreenStaring%2Fbig_commerce-management_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreenStaring%2Fbig_commerce-management_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreenStaring%2Fbig_commerce-management_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreenStaring%2Fbig_commerce-management_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ScreenStaring","download_url":"https://codeload.github.com/ScreenStaring/big_commerce-management_api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248613280,"owners_count":21133483,"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":["bigcommerce","bigcommerce-api","e-commerce","e-commerce-platform","ruby"],"created_at":"2024-11-07T15:05:19.143Z","updated_at":"2026-02-12T01:14:42.559Z","avatar_url":"https://github.com/ScreenStaring.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BigCommerce::ManagementAPI\n\n![CI Status](https://github.com/ScreenStaring/big_commerce-management_api/actions/workflows/ci.yml/badge.svg)\n\nv3 API client for [BigCommerce's REST Management API](https://developer.bigcommerce.com/docs/rest-management)\n\n**Incomplete! v3 has many endpoints and this only provides what we need at ScreenStaring** which currently\nis mostly customers and subscribers stuff but adding new endpoints should be trivial. See [Adding New Endpoints](#adding-new-endpoints).\n\n## Installation\n\nAdd this line to your application's `Gemfile`:\n\n```ruby\ngem \"big_commerce-management_api\"\n```\n\nAnd then execute:\n\n    bundle install\n\nOr install it yourself as:\n\n    gem install big_commerce-management_api\n\n## Usage\n\n```rb\nrequire \"big_commerce/management_api\"\n\nbc = BigCommerce::ManagementAPI.new(store_hash, auth_token)\ncustomers = bc.customers.get\ncustomers = bc.customers.get(:id =\u003e [1,2,3], :include =\u003e %w[addresses formfields])\n\np customers.meta.pagination.total\np customers.headers.request_id\np customers.headers[\"some-header\"]\n\n# customers is Enumerable\ncustomers.each do |customer|\n  p customer.first_name\n  p customer.addresses[0].address_type\n  # ...\nend\n\nbegin\n  customers = bc.customers.get(:page =\u003e 2, :limit =\u003e 99) # limit defaults to 250\nrescue BigCommerce::ManagementAPI::ResponseError =\u003e e\n  p e.message\n  p e.headers.rate_limit_requests_left\nend\n\nattribute = bc.customers.attributes.create(\n  :name =\u003e \"Daily screen-staring count\",\n  :type =\u003e \"number\"\n)\np attribute.id\np attribute.meta.total # 1\n```\n\n## Adding New Endpoints\n\n1. Add JSON response body to `lib/big_commerce/management/classes.json`\n1. Create or update `lib/big_commerce/management/THE_RESOURCE.rb`. See `customers.rb` for an example\n1. For new classes\n   - If the response JSON's top-level property is not `\"data\"` define `RESULT_KEY` with the name of the top-level property\n   - Define `RESULT_INSTANCE` and set it to the class to use on response data pointed to by `RESULT_KEY`\n   - Call the appropriate HTTP verb method passing the endpoint's path (the portion **after** the API's `v3` URL) and parameters\n1. If the method's return value should not be an `Array` call `unwrap(result)` before returning\n\n## Testing\n\nTests use [VCR](https://github.com/vcr/vcr). If you need to re-record cassettes or create new ones a BigCommerce\naccount is with API access is required. See `.env.test.example`.\n\nTo re-record certain tests you must import fixture data into your store. See `etc/customers.csv`. These records can be deleted once\nthe VCR cassettes are recorded and you are done with development. The IDs they create are assumed by the tests which may present\na problem. Open an issue if so.\n\nAny records that are created by the tests are deleted. Well, a delete is attempted in an `after` block, if something goes wrong with the test\nthe record(s) may remain in your store.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n---\n\nMade by [ScreenStaring](http://screenstaring.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscreenstaring%2Fbig_commerce-management_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscreenstaring%2Fbig_commerce-management_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscreenstaring%2Fbig_commerce-management_api/lists"}