Skip to main content
Import Courses through public channels
POST https://services.leadconnectorhq.com/courses/courses-exporter/public/import

Autorización

Authorization
string
required
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.

Body

locationId
string
required
userId
string
products
object[]
required

Respuestas

Ejemplo

curl -X POST 'https://services.leadconnectorhq.com/courses/courses-exporter/public/import' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "locationId": "string",
  "userId": "string",
  "products": [
    {
      "title": "string",
      "description": "string",
      "imageUrl": "string",
      "categories": [
        {}
      ],
      "instructorDetails": {
        "name": "string",
        "description": "string"
      }
    }
  ]
}'
const response = await fetch('https://services.leadconnectorhq.com/courses/courses-exporter/public/import', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
    Version: '2021-07-28',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"locationId": "string", "userId": "string", "products": [{"title": "string", "description": "string", "imageUrl": "string", "categories": [{}], "instructorDetails": {"name": "string", "description": "string"}}]}),
});
const data = await response.json();
import os, requests
response = requests.request(
    'POST',
    'https://services.leadconnectorhq.com/courses/courses-exporter/public/import',
    headers={
        'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
        'Version': '2021-07-28',
        'Content-Type': 'application/json',
    },
    json={"locationId": "string", "userId": "string", "products": [{"title": "string", "description": "string", "imageUrl": "string", "categories": [{}], "instructorDetails": {"name": "string", "description": "string"}}]},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/courses/courses-exporter/public/import');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
        'Version: 2021-07-28',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode({'locationId': 'string', 'userId': 'string', 'products': [{'title': 'string', 'description': 'string', 'imageUrl': 'string', 'categories': [{}], 'instructorDetails': {'name': 'string', 'description': 'string'}}]}),
]);
$data = json_decode(curl_exec($ch), true);