Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 46 additions & 40 deletions documentation/guides/api-quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ To use the Voucherify API, you need two credentials:

Add these headers to every API request.

**To find your keys:**

1. Go to **Project settings**.
2. Open the **General** tab.
3. Scroll to the **Application keys** section.
To find your keys, go to **Project settings** > **General** and scroll to the **Application keys** section.

**Key types:**

Expand All @@ -50,39 +46,62 @@ Your Sandbox project includes test campaigns and codes you can use right away.

The most common API call is **validation**. This checks if a customer can use a discount code on their order.

**To make your first validation call:**

1. Log in to your Voucherify account (top right corner of this page). This connects your Sandbox API keys to the interactive documentation.

2. Go to [Validate stackable discounts](/api-reference/validations/validate-stackable-discounts).
<Steps>
<Step title="Open the validation endpoint">
Log in to your Voucherify account from the top right corner of [this page](/api-reference/validations/validate-stackable-discounts). This connects your Sandbox API keys to the interactive documentation.
</Step>

3. Click **Try it** button.
<Step title="Configure the validation request">
Click **Try it** and select your **Cluster** based on your region:

4. Select your **Cluster** based on your region:
- `api` – Europe
- `us1.api` – North America
- `as1.api` – Asia
- `api` – Europe
- `us1.api` – North America
- `as1.api` – Asia

5. The cURL field on the right will already have the Sandbox onboarding validation selected.
The cURL field on the right will already have the Sandbox onboarding validation selected.
</Step>

6. Click **Send** to send the request.
<Step title="Send the validation request">
</Step>
</Steps>

The response appears above the request. You can modify the request using the interactive documentation.

**Alternative:** Use the [Postman collection](https://www.postman.com/voucherify) to make API calls.

**Next steps:** Explore the [Sandbox project and Demo shop](#-explore-the-sandbox-project) to test campaigns and view API payloads.
**Next steps:** Explore the [Sandbox project and Demo shop](#explore-the-sandbox-project) to test campaigns and view API payloads.

## Use the Postman collection

[Postman](https://www.postman.com/) is a tool for testing APIs. The Voucherify Postman collection includes all API endpoints and integration examples.

**To get started:**
<Steps>
<Step title="Fork the collection">
Go to the [Voucherify Postman collection](https://www.postman.com/voucherify/voucherify-s-public-workspace/overview) and fork it to your Postman workspace.

For beginners, fork [Voucherify API – Onboarding](https://www.postman.com/voucherify/voucherify-s-public-workspace/collection/iut4une/voucherify-api-onboarding).
</Step>

<Step title="Configure the environment">
Add your API credentials in **Environments**:

- `X-App-Id` – your Application ID
- `X-App-Token` – your Application secret key
- `url` – your Voucherify API cluster URL

1. Go to the [Voucherify Postman collection](https://www.postman.com/voucherify/voucherify-s-public-workspace/overview).
2. Fork the collection to your Postman workspace. For beginners, fork [Voucherify API – Onboarding](https://www.postman.com/voucherify/voucherify-s-public-workspace/collection/iut4une/voucherify-api-onboarding).
3. Add your API credentials in **Environments**.
4. Send your first [validation request](https://www.postman.com/voucherify/voucherify-s-public-workspace/request/m646u4g/onboarding-validation-request).
<Note>
Set the `url` value to match your Voucherify cluster:

- Europe: `https://api.voucherify.io`
- North America: `https://us1.api.voucherify.io`
- Asia: `https://as1.api.voucherify.io`
</Note>
</Step>

<Step title="Run the Postman request">
Send your first [validation request](https://www.postman.com/voucherify/voucherify-s-public-workspace/request/m646u4g/onboarding-validation-request).
</Step>
</Steps>

**Available collections:**

Expand All @@ -92,11 +111,7 @@ The response appears above the request. You can modify the request using the int

## Invite team members

**To add users to your team:**

1. Click your name in the lower left corner.
2. Go to **Team Settings**.
3. Select **Team** to invite members and assign [roles](/manage/members-and-roles).
To add users to your team, click your name in the lower left corner and go to **Team Settings** > **Team** to invite members and assign [roles](/manage/members-and-roles).

<Check>
Enterprise clients can use the [Management API](/guides/management-api) to perform account-related activities regarding projects, users, and other settings through the API.
Expand All @@ -110,12 +125,7 @@ The [Sandbox project](/guides/api-quickstart#explore-the-sandbox-project) helps

The [Audit log](/analyze/audit-logs) tracks all API activity.

**To view API logs:**

1. Go to **Audit log** in the left sidebar.
2. Click **Add filter**.
3. Select **Channel**.
4. Choose condition `in` and select `API`.
To view API logs, go to **Audit log** in the left sidebar. Click **Add filter**, select **Channel**, choose condition `in`, and select `API`.

The log shows status, method, URL, log ID, channel, and creation date.

Expand All @@ -125,10 +135,6 @@ Click any log entry to see request and response bodies, query parameters, and re

The Demo shop shows how Voucherify integrates with customer applications. Use it to test campaigns and monitor API calls during the customer journey.

**To use the Demo shop:**

1. Go to **Marketer hub** in the left sidebar.
2. Click **Demo shop**.
3. Expand the **API calls** bar at the bottom of the screen.
To use the Demo shop, go to **Marketer hub** in the left sidebar and click **Demo shop**. Expand the **API calls** bar at the bottom of the screen.

The API calls section shows endpoint details, methods, and JSON payloads. You can copy payloads or view the API documentation for each method.
The API calls section shows endpoint details, methods, and JSON payloads. You can copy payloads or view the API documentation for each method.
Loading