Toggle capabilities for the marketplace app tied to the OAuth client
http
PUT https://services.leadconnectorhq.com/payments/custom-provider/capabilitiesAuthorization
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
Authorization | string | Yes | Bearer token generated from the Leadway portal. See Authentication. | |
Version | string | Yes | 2021-07-28 | API version. |
Body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
supportsSubscriptionSchedules | boolean | Yes | True | Whether the marketplace app supports subscription schedules or not |
companyId | string | No | Yjnwuduw83e8x30sm0 | Company id. Mandatory if locationId is not provided |
locationId | string | No | Yjnwuduw83e8x30sm0 | Account / Account id. Mandatory if companyId is not provided |
Responses
200 - Successful response
success(boolean, required): Whether the custom provider capabilities are updated or not. true represents capabilities are updated Example:true
json
{
"success": "true"
}400 - Bad Request
json
{}422 - Unprocessable Entity
json
{}Example
curl -X PUT 'https://services.leadconnectorhq.com/payments/custom-provider/capabilities' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"supportsSubscriptionSchedules": true,
"companyId": "Yjnwuduw83e8x30sm0",
"locationId": "Yjnwuduw83e8x30sm0"
}'const response = await fetch('https://services.leadconnectorhq.com/payments/custom-provider/capabilities', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"supportsSubscriptionSchedules": true, "companyId": "Yjnwuduw83e8x30sm0", "locationId": "Yjnwuduw83e8x30sm0"}),
});
const data = await response.json();import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/payments/custom-provider/capabilities',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"supportsSubscriptionSchedules": true, "companyId": "Yjnwuduw83e8x30sm0", "locationId": "Yjnwuduw83e8x30sm0"},
)
data = response.json()<?php
$ch = curl_init('https://services.leadconnectorhq.com/payments/custom-provider/capabilities');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'supportsSubscriptionSchedules': true, 'companyId': 'Yjnwuduw83e8x30sm0', 'locationId': 'Yjnwuduw83e8x30sm0'}),
]);
$data = json_decode(curl_exec($ch), true);