Skip to content

Getting started

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:

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 version
  • Accept-Version: 2.0: Latest version
  • Accept-Version: 1.0: Deprecated version

Current version in production is 2.0

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

Terminal window
$ curl -s -H 'Accept-Version: 2.0' -X POST -u user@domain.tld https://api.sandbox.re-zip.com/me/access-token
Enter 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"
}