Toggle capabilities for the marketplace app tied to the OAuth client
PUT https://services.leadconnectorhq.com/payments/custom-provider/capabilities
Autorización
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.
Body
supportsSubscriptionSchedules
boolean
default:"True"
required
Whether the marketplace app supports subscription schedules or not
companyId
string
default:"Yjnwuduw83e8x30sm0"
Company id. Mandatory if locationId is not provided
locationId
string
default:"Yjnwuduw83e8x30sm0"
Account / Account id. Mandatory if companyId is not provided
Respuestas
200 - Successful response
success
boolean
default:"true"
required
Whether the custom provider capabilities are updated or not. true represents capabilities are updated
422 - Unprocessable Entity
Ejemplo
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);