Getting started
Recommended reading
Section titled “Recommended reading”The RE-ZIP API is based on the principles of Representational State Transfer (REST) allowing clients to create, view, modify and delete resources using standard HTTP request methods.
Recommended reading:
- HTTP: http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol
- Headers:
http://en.wikipedia.org/wiki/List_of_HTTP_headers
- Basic authentication http://en.wikipedia.org/wiki/Basic_access_authentication
- Token authentication (Bearer)
- Status codes: http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
- REST: http://en.wikipedia.org/wiki/Representational_State_Transfer
- JSON: http://en.wikipedia.org/wiki/JSON
Versioning
Section titled “Versioning”Over time new features will come along and others will be removed. To foresee and avoid potential compatibility issues, the API handles this by having multiple versions available at the same time. How to specify the desired version in the HTTP request is explained in detail later on.
There is however a limit in terms of backward compability and at any time only the two newest versions will be available. In addition a be beta/preview version might also be available. These examples demostrates the versions and their lifecycle:
Accept-Version: 3.0b: Public beta/preview versionAccept-Version: 2.0: Latest versionAccept-Version: 1.0: Deprecated version
Current version in production is 2.0
If we have deprecated some functionality and we concludes through our own metrics and analytics that the deprecated behaviour is no longer used by anyone we may opt to remove it without a version bump, this is why its important to subscribe to our rss feed.
Security and access
Section titled “Security and access”Any and all communication with the API is end-to-end encrypted using TLS version 1.2 or newer.
To interact with our API you will need to create a user. A user account is a personal account that can be connected to one or more business accounts. To connect and gain access to a business account requires an invitation from that account. Please ask the account owner for an invitation.
Authentication is done by using the HTTP Authorization header; Basic
authentication (username + password) and Token authentication (Bearer token).
The Basic authentication method is limited to the API for user accounts (/me).
To use the APIs for business accounts you will need to create an access token.
There also exists personal access tokens, made to be used in automated systems, These can (and probably should) be limited to the specific permissions required for the automated use-case and be limited in time. When using a personal access token (pat) use Pat instead of Bearer or Basic in the Authorization Header
Example request
Section titled “Example request”$ curl -s -H 'Accept-Version: 2.0' -X POST -u user@domain.tld https://api.sandbox.re-zip.com/me/access-tokenEnter host password for user 'user@domain.tld':M5e6aiWrMzMMivbb9WJlYEuWSmW/nQRn/TfcBjwFyhlexcKK2u1QFQfWX8YS4OU5
$ curl -s -H 'Accept-Version: 2.0' -H 'Authorization: Bearer M5e6aiWrMzMMivbb9WJlYEuWSmW/nQRn/TfcBjwFyhlexcKK2u1QFQfWX8YS4OU5' https://api.sandbox.re-zip.com/ping | pp.json{ "message": "pong", "user": { "name": "User Name", "email": "user@domain.tld", "created_at": "2023-08-25 08:08:54 +0000" }, "remote_addr": "XXX.YYY.ZZZ.WWW"}
$ curl -s -H 'Accept-Version: 2.0' -X POST -d '{"name": "shopify_api_key", "expires_at": "2022-05-14T10:16:28.856Z", "acl_permissions": [{"resource": "/path/to/:id", "get": true, "put": true, "post": true, "patch": true, "delete": true}]}' -H 'Authorization: Bearer M5e6aiWrMzMMivbb9WJlYEuWSmW/nQRn/TfcBjwFyhlexcKK2u1QFQfWX8YS4OU5' https://api.sandbox.re-zip.com/partner/01JAYSCS07SVDQANFS61TF0XJN/agreement/01JAYSDB1037Y6X8WSJ1EZQ03X/personal_access_token | pp.json{ "id": "01G2TG95NVC0111J5RV1797BPG", "name": "shopify_api_key", "user_agreement_id": "01G2TG95NVC0111J5RV1797BPG", "last_used": "2022-05-14T10:16:28.856Z", "created_at": "2022-05-14T10:16:28.856Z", "refreshed_at": "2022-05-14T10:16:28.856Z", "expires_at": "2022-05-14T10:16:28.856Z", "acl_permissions": [ { "resource": "/path/to/:id", "get": true, "put": true, "post": true, "patch": true, "delete": true } ], "token": "RZ01.01JAYS5NWSWJHJQ6186WTW75GX.01JAYS7WDR8YR5QR0ES657488K"}
$ curl -s -H 'Accept-Version: 2.0' -H 'Authorization: Pat RZ01.01JAYS5NWSWJHJQ6186WTW75GX.01JAYS7WDR8YR5QR0ES657488K' https://api.sandbox.re-zip.com/ping | pp.json{ "message": "pong", "user": { "name": "User Name", "email": "user@domain.tld", "created_at": "2023-08-25 08:08:54 +0000" }, "remote_addr": "XXX.YYY.ZZZ.WWW"}Getting in Touch
Section titled “Getting in Touch”If you’re an engineer and are currently integrating with us and have questions feel free to send us an email at helpdesk@re-zip.com. We can even setup an external slack channel if you’re so inclined.
RSS Feed
Section titled “RSS Feed”If you have a re-zip integration in production, it is recommended that you subscribe to our rss feed at https://api-docs.re-zip.com/rss.xml. This way you’ll get notifications about deprications of specific endponts.