Configuring the API
To configure your API for Partnerplace, follow these steps:
1. Generate API Key
- Go to the Administrator Panel.
- Navigate to the Integrations section.
- Click on the Enable API button to turn on the module.
Once enabled, the API Status, will change to Active.
- Click on the Generate API Key button to create a new API key, you will be asked to enter your account password to confirm. Once done, the key will be displayed on the page.
2. API Endpoints
Partnerplace provides the following API endpoints:
2.1 List All Leads
- Endpoint:
https://app.partnerplace.io/api/1.1/wf/all-leads
- Method: POST
- Description: This endpoint returns a list of all leads for your account.
- Headers:
Authorization: Bearer {API_KEY}
- Parameters:
page
: (Optional) The page number for pagination (max number of replies per page is 50).
Example CURL Request:
curl -X POST "https://app.partnerplace.io/api/1.1/wf/all-leads" \ -H "Authorization: Bearer YOUR_API_KEY"
Example JSON Response:
{ "list": [ { "id": "1214942195x42812321042122", "name": "Example Lead 1", "partner": "Partner 1" }, { "id": "1832732720x123213213455", "name": "Example Lead 2", "partner": "Partner 2" } ], "totalPages": "1", "currentPage": "1" }
2.2 Lead Details
- Endpoint:
https://app.partnerplace.io/api/1.1/wf/lead-details
- Method: POST
- Description: This endpoint returns the details of a specific lead based on the provided ID.
- Headers:
Authorization: Bearer {API_KEY}
Content-Type: application/json
- Parameters:
id
: The ID of the lead (obtained from the "all-leads" endpoint).
Example CURL Request:
curl -X POST "https://app.partnerplace.io/api/1.1/wf/lead-details" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"id": "lead_id"}'
Example JSON Response:
{ "name": "Example Lead", "id": "1234567890x0987654321", "partner": "Partner Example", "status": "In Progress", "stage": "Initial Contact", "estimated_value": "10000", "estimated_commission": "500", "created_at": "Jun 3, 2024 10:00 am", "timeline_events": [ { "title": "Lead created", "update_type": "Lead", "comment": "Lead was created" }, { "title": "Status changed", "update_type": "Lead", "comment": "Status changed to In Progress" } ], "form_values": [ { "question": "Challenges", "value": "Finding the right solution" }, { "question": "Authority", "value": "Decision Maker" }, { "question": "Money", "value": "10000" }, { "question": "Priority", "value": "High" } ] }
Troubleshooting
- Invalid API Key:
- Solution: Ensure that the API key is correctly copied from the Integrations section. The key should be included in the
Authorization
header asBearer YOUR_API_KEY
.
- Solution: Ensure that the API key is correctly copied from the Integrations section. The key should be included in the
- Invalid Password entered on API Key generation:
- Solution: Ensure that you enter your account password, no CAPS LOCKS, correct keyboard layout selected and again, make sure you actually remember your password (check it in your password manager or reset it, if you have to).
- Authentication Errors:
- Solution: Check that the API key has not expired. Generate a new key, if necessary.
- Incorrect Endpoint URL:
- Solution: Verify that the endpoint URLs are correct. They should match the examples provided above.
- Pagination Issues:
- Solution: If you are not getting the expected number of leads, check the
page
parameter to ensure you are querying the correct page of results.
- Solution: If you are not getting the expected number of leads, check the
- Malformed JSON Request:
- Solution: Ensure that your JSON body in the POST request is correctly formatted. Use a JSON validator to check for any syntax errors.