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" } ] }
2.3 Add Lead
- Endpoint:
https://app.partnerplace.io/api/1.1/wf/add-lead
- Method: POST
- Description: This endpoint allows you to add a new lead by providing the name, partner email, stage, status, value, and any custom form questions. Only the name and partner email are required fields - estimated value, stage, status, and custom form responses are optional.
In addition to the standard lead information, users can submit custom form questions specific to the lead. These questions and responses will only be visible for this particular lead and will not appear in the lead forms view in the administration panel.
- Headers:
Authorization: Bearer {API_KEY}
Content-Type: application/json
Example CURL Request:
curl -X POST "https://app.partnerplace.io/api/1.1/wf/add-lead"-H "Authorization: Bearer " d '{"name": "Lead Name", "partner": "partner@example.com", "stage": "Won", "status": "New", "value": 5000, "form": [ { "question": "What pain points is your lead facing and how can your solution solve them?", "answer": "The lead is facing scalability issues, and our cloud solution can address that." }, { "question": "What is the level of urgency to purchase and implement a solution?", "answer": "The lead has expressed an urgent need to implement within the next quarter." } ] }'
Example JSON Response:
{"success": true, "info": "Lead 'Example 1' has been successfully added." }
2.4 Edit Lead
- Endpoint:
https://app.partnerplace.io/api/1.1/wf/edit-lead
- Method: POST
- Description: This endpoint allows you to edit a lead by specifying its ID in the body as a parameter. You can also provide a new name, partner, value, stage, and status in the request body. The ID can be obtained from the "all-leads" endpoint, which returns the ID for each lead.
- Headers:
Authorization: Bearer {API_KEY}
Content-Type: application/json
Example CURL Request:
curl -X POST "https://app.partnerplace.io/api/1.1/wf/edit-lead"-H "Authorization: Bearer " d '{"id": "lead_id", "name": "New Lead Name", "partner": "test@example.com", "value": 7000, "stage": "Won", "status": "New" }'
Example JSON Response:
{"success": true, "info": "Lead 'Example 1' has been successfully added." }
2.5 Add Partner
- Endpoint:
https://app.partnerplace.io/api/1.1/wf/add-partner
- Method: POST
- Description: This endpoint allows you to add a new partner by providing their email address and name. Additional details can be added later in Partnerplace. You can also choose whether to send a welcome message to the partner using the send_welcome_email field.
- Headers:
Authorization: Bearer {API_KEY}
Content-Type: application/json<br>
Example CURL Request:
curl -X POST "https://app.partnerplace.io/api/1.1/wf/add-partner"-H "Authorization: Bearer " d '{"email": "partner@example.com", "name": "Partner Name", "send_welcome_email": true }'
Example JSON Response:
{"success": true, "info": "Partner 'Example Partner' has been successfully added." }
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.