Service Provider Pro¶
The Service Provider Pro modules allow you to monitor, create, list, and delete the order messages, orders, forms, accounts, invoices, messages, subscriptions, and tickets from your Service Provider Pro account.
Getting Started with Service Provider Pro¶
Prerequisites
- A Service Provider Pro account - create an account at spp.co.
Note
The module dialog fields that are displayed in bold (in the Ibexa Connect scenario, not in this documentation article) are mandatory!
Connecting Service Provider Pro to Ibexa Connect¶
To connect your Service Provider Pro account to Ibexa Connect you need to obtain the API Key from your Service Provider Pro account and insert it in the Create a connection dialog in the Ibexa Connect module.
1. Log in to your Service Provider Pro account.
2. Click Modules > API > Settings.
3. Copy the API Key to your clipboard.
4. Log in to your Ibexa Connect account, add a module from the Service Provider Pro app into an Ibexa Connect scenario.
5. Click Add next to the Connection field.
6. In the Connection name field, enter a name for the connection.
7. In the API Key and Subd*omain name* field, enter the details copied in step 3, and click Continue.
The connection has been established.
Messages¶
Create an Order Message¶
Creates an order message.
Order ID | Select or map the Order ID for which you want to create an order message. |
Message | Enter (map) the message text. |
User ID | Enter (map) the User ID that is sending the message. |
Staff Only | Select whether the message is accessible only to the staff. |
List Order Messages¶
Lists all order messages.
Order ID | Select or map the Order ID to list the order messages. |
Limit | Set the maximum number of results Ibexa Connect should return during one execution cycle. The default value is 10. |
Delete an Order Message¶
Deletes an order message.
Order ID | Select or map the Order ID whose messages you want to delete. |
Message ID | Select or map the Message ID you want to delete. |
Webhooks¶
See the section, Setting Up Service Provide Pro Webhooks to add webhooks in your Service Provider account.
Watch Orders¶
Triggers when a new order is created or order status changed or order is tagged.
Webhook | Enter a name for the webhook. |
Watch Forms¶
Triggers when a form is submitted.
Webhook | Enter a name for the webhook. |
Watch Accounts¶
Triggers when an account is created or deleted.
Webhook | Enter a name for the webhook. |
Watch Invoices¶
Triggers when an invoice is created or paid or refunded.
Webhook | Enter a name for the webhook. |
Watch Messages¶
Triggers when a message is posted.
Webhook | Enter a name for the webhook. |
Watch Subscriptions¶
Triggers when a subscription is paid or failed or canceled.
Webhook | Enter a name for the webhook. |
Watch Tickets¶
Triggers when a ticket is created.
Webhook | Enter a name for the webhook. |
Other¶
Make an API Call¶
Performs an arbitrary authorized API Call.
URL |
Enter a path relative to | For the list of available endpoints, refer to the Service Provider Pro API Documentation. |
Method
Select the HTTP method you want to use:
GET to retrieve information for an entry.
POST to create a new entry.
PUT to update/replace an existing entry.
PATCH to make a partial entry update.
DELETE to delete an entry.
Headers
Enter the desired request headers. You don't have to add authorization headers; we already did that for you.
Query String
Enter the request query string.
Body
Enter the body content for your API call.
Example of Use - List Orders¶
The following API call returns all the orders from your Service Provide Pro account:
URL: /v1/orders
Method: GET
Matches of the search can be found in the module's Output under Bundle > Body. In our example, 9 orders were returned:
Setting Up Service Provider Pro Webhooks¶
1. Open any Watch module, enter a name for the webhook, click Save, and copy the URL address to your clipboard. Click OK and save the trigger.
2. Log in to your Service Provider Pro account.
3. Click the Modules > Webhooks Settings.
4. Click the Add endpoint button.
5. Enter the following details and click Add endpoint.
URL to be called | Enter (map) the URL address copied in step 1. |
Event to send | Select or map the event you want to watch. |
Webhook token | This field is auto-generated by the system. |
The webhook is successfully added. Watch* module, enter a name for the webhook, click Save, and copy the URL address to your clipboard. Click OK and save the trigger.
2. Log in to your Service Provider Pro account.
3. Click the Modules > Webhooks Settings.
4. Click the Add endpoint button.
5. Enter the following details and click Add endpoint.
URL to be called | Enter (map) the URL address copied in step 1. |
Event to send | Select or map the event you want to watch. |
Webhook token | This field is auto-generated by the system. |
The webhook is successfully added.