Getting Started

Affiliate Area

Troubleshooting

Miscellaneous

Integrations

Pre-sale Questions

Developers

Functions

Filters

REST API

The REST API allows you to retrieve, create, update and delete SliceWP stored data via external requests.

In this article, you’ll learn how to set up the REST API to be able to make calls and also what endpoints you have at your fingertips to retrieve and alter the SliceWP data.

Requirements: To get started with the REST API add-on, you will need a SliceWP Pro or Pro Plus license.

Activating the REST API add-on

  1. From your SliceWP account page, download and install the SliceWP Pro plugin. Click here for a step-by-step guide on how to do this.
  2. Once you have SliceWP Pro installed, navigate to your WordPress admin area > SliceWP > Add-ons page and activate the REST API add-on.

Creating an API key

To validate your requests, you will need to set up an API key. Without these keys you will not be able to retrieve or modify the data in any way.

Here’s how you can create your first SliceWP API key:

  1. Navigate to SliceWP > Settings > Tools (tab) > API Keys (section). Here, click the Add new API key button.
  2. Then, name your API key, so that you can identify it later and select the user that will be authenticated when making requests. Only administrator users can be selected. Then select between Read, Write and Read/Write to set the permissions this set of API keys will have.
  3. Lastly, click the Generate API key button. Once you do this, SliceWP will create a Consumer Key and a Consumer Secret key that you can use to make requests.

Important note: For security reasons, the consumer key and consumer secret strings will be displayed only when you create them. Once you navigate away from the Settings page, you will no longer be able to view these keys. So please keep them safe and make sure you’ve copied them down.

Managing affiliates

You have 5 endpoints to retrieve, create, update and delete affiliates, under two route patterns:

  • affiliates
    • If you send a GET request you can retrieve a list of affiliates.
    • If you send a POST request you can create a new affiliate.
  • affiliates/[affiliate_id]
    • If you send a GET request you can retrieve a single affiliate’s data.
    • If you send a POST/PUT request you can update an affiliate.
    • If you send a DELETE request you can delete an affiliate.

Managing commissions

You have 5 endpoints to retrieve, create, update and delete commissions, under two route patterns:

  • commissions
    • If you send a GET request you can retrieve a list of commissions.
    • If you send a POST request you can create a new commission.
  • commissions/[commission_id]
    • If you send a GET request you can retrieve a single commission’s data.
    • If you send a POST/PUT request you can update a commission.
    • If you send a DELETE request you can delete a commission.

Managing customers

You have 5 endpoints to retrieve, create, update and delete customers, under two route patterns:

  • customers
    • If you send a GET request you can retrieve a list of customers.
    • If you send a POST request you can create a new customer.
  • customers/[customer_id]
    • If you send a GET request you can retrieve a single customer’s data.
    • If you send a POST/PUT request you can update a customer.
    • If you send a DELETE request you can delete a customer.

Managing payouts

You have 5 endpoints to retrieve, create, update and delete payouts, under two route patterns:

  • payouts
    • If you send a GET request you can retrieve a list of payouts.
    • If you send a POST request you can create a new payout.
  • payouts/[payout_id]
    • If you send a GET request you can retrieve a single payout’s data.
    • If you send a POST/PUT request you can update a payout.
    • If you send a DELETE request you can delete a payout.

Managing payments

You have 5 endpoints to retrieve, create, update and delete payments, under two route patterns:

  • payments
    • If you send a GET request you can retrieve a list of payments.
    • If you send a POST request you can create a new payment.
  • payments/[payment_id]
    • If you send a GET request you can retrieve a single payment’s data.
    • If you send a POST/PUT request you can update a payment.
    • If you send a DELETE request you can delete a payment.

Managing visits

You have 5 endpoints to retrieve, create, update and delete visits, under two route patterns:

  • visits
    • If you send a GET request you can retrieve a list of visits.
    • If you send a POST request you can create a new visit.
  • visits/[visit_id]
    • If you send a GET request you can retrieve a single visit’s data.
    • If you send a POST/PUT request you can update a visit.
    • If you send a DELETE request you can delete a visit.

Was this article helpful?

Do you have any feedback or suggestions to improve this page?

Can't find what you're looking for? We're here to help.

Contact us