Update Product Details
curl --request PUT \
--url https://app.papelship.com/api_user/api/v1/products/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-store-hash: <api-key>' \
--data '
{
"id": 101,
"hash_id": "a1b2c3d4e5f6",
"name": "Premium License Key",
"slug": "premium-license-key",
"type": "serials",
"price_cents": 2999,
"currency": "USD",
"status": "active",
"active": 1,
"sales_count": 5,
"categories": [
{
"id": 123,
"name": "<string>"
}
],
"details": {
"short_description": "<string>",
"description_html": "<string>"
}
}
'const options = {
method: 'PUT',
headers: {
'x-api-key': '<api-key>',
'x-store-hash': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: 101,
hash_id: 'a1b2c3d4e5f6',
name: 'Premium License Key',
slug: 'premium-license-key',
type: 'serials',
price_cents: 2999,
currency: 'USD',
status: 'active',
active: 1,
sales_count: 5,
categories: [{id: 123, name: '<string>'}],
details: {short_description: '<string>', description_html: '<string>'}
})
};
fetch('https://app.papelship.com/api_user/api/v1/products/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.papelship.com/api_user/api/v1/products/{id}"
payload = {
"id": 101,
"hash_id": "a1b2c3d4e5f6",
"name": "Premium License Key",
"slug": "premium-license-key",
"type": "serials",
"price_cents": 2999,
"currency": "USD",
"status": "active",
"active": 1,
"sales_count": 5,
"categories": [
{
"id": 123,
"name": "<string>"
}
],
"details": {
"short_description": "<string>",
"description_html": "<string>"
}
}
headers = {
"x-api-key": "<api-key>",
"x-store-hash": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.papelship.com/api_user/api/v1/products/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => 101,
'hash_id' => 'a1b2c3d4e5f6',
'name' => 'Premium License Key',
'slug' => 'premium-license-key',
'type' => 'serials',
'price_cents' => 2999,
'currency' => 'USD',
'status' => 'active',
'active' => 1,
'sales_count' => 5,
'categories' => [
[
'id' => 123,
'name' => '<string>'
]
],
'details' => [
'short_description' => '<string>',
'description_html' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-store-hash: <api-key>"
],
]);
$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_user/api/v1/products/{id}"
payload := strings.NewReader("{\n \"id\": 101,\n \"hash_id\": \"a1b2c3d4e5f6\",\n \"name\": \"Premium License Key\",\n \"slug\": \"premium-license-key\",\n \"type\": \"serials\",\n \"price_cents\": 2999,\n \"currency\": \"USD\",\n \"status\": \"active\",\n \"active\": 1,\n \"sales_count\": 5,\n \"categories\": [\n {\n \"id\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"details\": {\n \"short_description\": \"<string>\",\n \"description_html\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-store-hash", "<api-key>")
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,
"product": {
"id": 101,
"hash_id": "a1b2c3d4e5f6",
"name": "Premium License Key",
"slug": "premium-license-key",
"type": "serials",
"price_cents": 2999,
"currency": "USD",
"status": "active",
"active": 1,
"sales_count": 5,
"categories": [
{
"id": 123,
"name": "<string>"
}
],
"details": {
"short_description": "<string>",
"description_html": "<string>"
}
}
}Products
Update Product Details
Update details of an existing product.
PUT
/
products
/
{id}
Update Product Details
curl --request PUT \
--url https://app.papelship.com/api_user/api/v1/products/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-store-hash: <api-key>' \
--data '
{
"id": 101,
"hash_id": "a1b2c3d4e5f6",
"name": "Premium License Key",
"slug": "premium-license-key",
"type": "serials",
"price_cents": 2999,
"currency": "USD",
"status": "active",
"active": 1,
"sales_count": 5,
"categories": [
{
"id": 123,
"name": "<string>"
}
],
"details": {
"short_description": "<string>",
"description_html": "<string>"
}
}
'const options = {
method: 'PUT',
headers: {
'x-api-key': '<api-key>',
'x-store-hash': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: 101,
hash_id: 'a1b2c3d4e5f6',
name: 'Premium License Key',
slug: 'premium-license-key',
type: 'serials',
price_cents: 2999,
currency: 'USD',
status: 'active',
active: 1,
sales_count: 5,
categories: [{id: 123, name: '<string>'}],
details: {short_description: '<string>', description_html: '<string>'}
})
};
fetch('https://app.papelship.com/api_user/api/v1/products/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.papelship.com/api_user/api/v1/products/{id}"
payload = {
"id": 101,
"hash_id": "a1b2c3d4e5f6",
"name": "Premium License Key",
"slug": "premium-license-key",
"type": "serials",
"price_cents": 2999,
"currency": "USD",
"status": "active",
"active": 1,
"sales_count": 5,
"categories": [
{
"id": 123,
"name": "<string>"
}
],
"details": {
"short_description": "<string>",
"description_html": "<string>"
}
}
headers = {
"x-api-key": "<api-key>",
"x-store-hash": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.papelship.com/api_user/api/v1/products/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => 101,
'hash_id' => 'a1b2c3d4e5f6',
'name' => 'Premium License Key',
'slug' => 'premium-license-key',
'type' => 'serials',
'price_cents' => 2999,
'currency' => 'USD',
'status' => 'active',
'active' => 1,
'sales_count' => 5,
'categories' => [
[
'id' => 123,
'name' => '<string>'
]
],
'details' => [
'short_description' => '<string>',
'description_html' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-store-hash: <api-key>"
],
]);
$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_user/api/v1/products/{id}"
payload := strings.NewReader("{\n \"id\": 101,\n \"hash_id\": \"a1b2c3d4e5f6\",\n \"name\": \"Premium License Key\",\n \"slug\": \"premium-license-key\",\n \"type\": \"serials\",\n \"price_cents\": 2999,\n \"currency\": \"USD\",\n \"status\": \"active\",\n \"active\": 1,\n \"sales_count\": 5,\n \"categories\": [\n {\n \"id\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"details\": {\n \"short_description\": \"<string>\",\n \"description_html\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-store-hash", "<api-key>")
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,
"product": {
"id": 101,
"hash_id": "a1b2c3d4e5f6",
"name": "Premium License Key",
"slug": "premium-license-key",
"type": "serials",
"price_cents": 2999,
"currency": "USD",
"status": "active",
"active": 1,
"sales_count": 5,
"categories": [
{
"id": 123,
"name": "<string>"
}
],
"details": {
"short_description": "<string>",
"description_html": "<string>"
}
}
}Yetkilendirmeler
Your PapelShip API Key
Your Store Hash ID
Yol Parametreleri
Gövde
application/json
Örnek:
101
Örnek:
"a1b2c3d4e5f6"
Örnek:
"Premium License Key"
Örnek:
"premium-license-key"
Mevcut seçenekler:
file, serials, dynamic, subscription, donation, contact Örnek:
"serials"
Price in cents (e.g., 1000 = $10.00)
Örnek:
2999
Örnek:
"USD"
Mevcut seçenekler:
active, draft, hidden Örnek:
"active"
Mevcut seçenekler:
0, 1 Örnek:
1
Örnek:
5
Show child attributes
Show child attributes
Show child attributes
Show child attributes