Create Reseller Key
curl --request POST \
--url https://app.papelship.com/api/qpapel/v1/reseller/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_id": 12,
"reseller_id": 98,
"days": 30
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({product_id: 12, reseller_id: 98, days: 30})
};
fetch('https://app.papelship.com/api/qpapel/v1/reseller/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.papelship.com/api/qpapel/v1/reseller/keys"
payload = {
"product_id": 12,
"reseller_id": 98,
"days": 30
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.papelship.com/api/qpapel/v1/reseller/keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'product_id' => 12,
'reseller_id' => 98,
'days' => 30
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.papelship.com/api/qpapel/v1/reseller/keys"
payload := strings.NewReader("{\n \"product_id\": 12,\n \"reseller_id\": 98,\n \"days\": 30\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"message": "Reseller key created successfully",
"key": "RESELLER-KEY-1234",
"id": 99
}{
"success": false,
"error": "Missing required field or invalid value"
}{
"success": false,
"error": "Unauthorized access. Valid API key required."
}Reseller Keys
Create Reseller Key
Issue an access key allocated to an authorized reseller account.
POST
/
reseller
/
keys
Create Reseller Key
curl --request POST \
--url https://app.papelship.com/api/qpapel/v1/reseller/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_id": 12,
"reseller_id": 98,
"days": 30
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({product_id: 12, reseller_id: 98, days: 30})
};
fetch('https://app.papelship.com/api/qpapel/v1/reseller/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.papelship.com/api/qpapel/v1/reseller/keys"
payload = {
"product_id": 12,
"reseller_id": 98,
"days": 30
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.papelship.com/api/qpapel/v1/reseller/keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'product_id' => 12,
'reseller_id' => 98,
'days' => 30
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.papelship.com/api/qpapel/v1/reseller/keys"
payload := strings.NewReader("{\n \"product_id\": 12,\n \"reseller_id\": 98,\n \"days\": 30\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"message": "Reseller key created successfully",
"key": "RESELLER-KEY-1234",
"id": 99
}{
"success": false,
"error": "Missing required field or invalid value"
}{
"success": false,
"error": "Unauthorized access. Valid API key required."
}Yetkilendirmeler
BearerAuthApiKeyHeaderApiKeyHeaderLegacy
Standard HTTP Bearer token authentication header (e.g. Authorization: Bearer pk_live_...).
Gövde
application/json