Update an offer
curl --request PATCH \
--url https://api.fungies.io/v0/offers/{offerId}/update \
--header 'Content-Type: application/json' \
--header 'x-fngs-public-key: <api-key>' \
--header 'x-fngs-secret-key: <api-key>' \
--data '
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "",
"cover": "<string>",
"coverBlurHash": "<string>",
"price": 8.988465674311579e+307,
"originalPrice": 8.988465674311579e+307,
"freeProduct": false,
"limit": 4503599627370495,
"platform": "Global",
"recurringIntervalCount": 4503599627370496,
"trialIntervalCount": 4503599627370496,
"gtin": "<string>",
"externalId": "<string>",
"variantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"variantIdx": 0,
"fileName": "<string>",
"downloadFile": "<string>",
"downloadFileName": "<string>",
"downloadFileSize": 0,
"downloadDescription": "<string>",
"productKeys": [
"<string>"
],
"hasDiscount": true,
"warningMessage": "<string>",
"mutableQuantity": true,
"tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"downloadFileData": {
"chunks": [
{
"chunk": "<string>",
"metadata": {
"number": 0,
"start": 0,
"end": 0,
"size": 0
}
}
],
"totalChunks": 0,
"totalSize": 0
},
"downloadFileType": "<string>"
}
'import requests
url = "https://api.fungies.io/v0/offers/{offerId}/update"
payload = {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "",
"cover": "<string>",
"coverBlurHash": "<string>",
"price": 8.988465674311579e+307,
"originalPrice": 8.988465674311579e+307,
"freeProduct": False,
"limit": 4503599627370495,
"platform": "Global",
"recurringIntervalCount": 4503599627370496,
"trialIntervalCount": 4503599627370496,
"gtin": "<string>",
"externalId": "<string>",
"variantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"variantIdx": 0,
"fileName": "<string>",
"downloadFile": "<string>",
"downloadFileName": "<string>",
"downloadFileSize": 0,
"downloadDescription": "<string>",
"productKeys": ["<string>"],
"hasDiscount": True,
"warningMessage": "<string>",
"mutableQuantity": True,
"tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"downloadFileData": {
"chunks": [
{
"chunk": "<string>",
"metadata": {
"number": 0,
"start": 0,
"end": 0,
"size": 0
}
}
],
"totalChunks": 0,
"totalSize": 0
},
"downloadFileType": "<string>"
}
headers = {
"x-fngs-public-key": "<api-key>",
"x-fngs-secret-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-fngs-public-key': '<api-key>',
'x-fngs-secret-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
description: '',
cover: '<string>',
coverBlurHash: '<string>',
price: 8.988465674311579e+307,
originalPrice: 8.988465674311579e+307,
freeProduct: false,
limit: 4503599627370495,
platform: 'Global',
recurringIntervalCount: 4503599627370496,
trialIntervalCount: 4503599627370496,
gtin: '<string>',
externalId: '<string>',
variantId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
variantIdx: 0,
fileName: '<string>',
downloadFile: '<string>',
downloadFileName: '<string>',
downloadFileSize: 0,
downloadDescription: '<string>',
productKeys: ['<string>'],
hasDiscount: true,
warningMessage: '<string>',
mutableQuantity: true,
tags: [{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', name: '<string>'}],
downloadFileData: {
chunks: [{chunk: '<string>', metadata: {number: 0, start: 0, end: 0, size: 0}}],
totalChunks: 0,
totalSize: 0
},
downloadFileType: '<string>'
})
};
fetch('https://api.fungies.io/v0/offers/{offerId}/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fungies.io/v0/offers/{offerId}/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'description' => '',
'cover' => '<string>',
'coverBlurHash' => '<string>',
'price' => 8.988465674311579e+307,
'originalPrice' => 8.988465674311579e+307,
'freeProduct' => false,
'limit' => 4503599627370495,
'platform' => 'Global',
'recurringIntervalCount' => 4503599627370496,
'trialIntervalCount' => 4503599627370496,
'gtin' => '<string>',
'externalId' => '<string>',
'variantId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'variantIdx' => 0,
'fileName' => '<string>',
'downloadFile' => '<string>',
'downloadFileName' => '<string>',
'downloadFileSize' => 0,
'downloadDescription' => '<string>',
'productKeys' => [
'<string>'
],
'hasDiscount' => true,
'warningMessage' => '<string>',
'mutableQuantity' => true,
'tags' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>'
]
],
'downloadFileData' => [
'chunks' => [
[
'chunk' => '<string>',
'metadata' => [
'number' => 0,
'start' => 0,
'end' => 0,
'size' => 0
]
]
],
'totalChunks' => 0,
'totalSize' => 0
],
'downloadFileType' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-fngs-public-key: <api-key>",
"x-fngs-secret-key: <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://api.fungies.io/v0/offers/{offerId}/update"
payload := strings.NewReader("{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"\",\n \"cover\": \"<string>\",\n \"coverBlurHash\": \"<string>\",\n \"price\": 8.988465674311579e+307,\n \"originalPrice\": 8.988465674311579e+307,\n \"freeProduct\": false,\n \"limit\": 4503599627370495,\n \"platform\": \"Global\",\n \"recurringIntervalCount\": 4503599627370496,\n \"trialIntervalCount\": 4503599627370496,\n \"gtin\": \"<string>\",\n \"externalId\": \"<string>\",\n \"variantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"variantIdx\": 0,\n \"fileName\": \"<string>\",\n \"downloadFile\": \"<string>\",\n \"downloadFileName\": \"<string>\",\n \"downloadFileSize\": 0,\n \"downloadDescription\": \"<string>\",\n \"productKeys\": [\n \"<string>\"\n ],\n \"hasDiscount\": true,\n \"warningMessage\": \"<string>\",\n \"mutableQuantity\": true,\n \"tags\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\"\n }\n ],\n \"downloadFileData\": {\n \"chunks\": [\n {\n \"chunk\": \"<string>\",\n \"metadata\": {\n \"number\": 0,\n \"start\": 0,\n \"end\": 0,\n \"size\": 0\n }\n }\n ],\n \"totalChunks\": 0,\n \"totalSize\": 0\n },\n \"downloadFileType\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-fngs-public-key", "<api-key>")
req.Header.Add("x-fngs-secret-key", "<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))
}HttpResponse<String> response = Unirest.patch("https://api.fungies.io/v0/offers/{offerId}/update")
.header("x-fngs-public-key", "<api-key>")
.header("x-fngs-secret-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"\",\n \"cover\": \"<string>\",\n \"coverBlurHash\": \"<string>\",\n \"price\": 8.988465674311579e+307,\n \"originalPrice\": 8.988465674311579e+307,\n \"freeProduct\": false,\n \"limit\": 4503599627370495,\n \"platform\": \"Global\",\n \"recurringIntervalCount\": 4503599627370496,\n \"trialIntervalCount\": 4503599627370496,\n \"gtin\": \"<string>\",\n \"externalId\": \"<string>\",\n \"variantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"variantIdx\": 0,\n \"fileName\": \"<string>\",\n \"downloadFile\": \"<string>\",\n \"downloadFileName\": \"<string>\",\n \"downloadFileSize\": 0,\n \"downloadDescription\": \"<string>\",\n \"productKeys\": [\n \"<string>\"\n ],\n \"hasDiscount\": true,\n \"warningMessage\": \"<string>\",\n \"mutableQuantity\": true,\n \"tags\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\"\n }\n ],\n \"downloadFileData\": {\n \"chunks\": [\n {\n \"chunk\": \"<string>\",\n \"metadata\": {\n \"number\": 0,\n \"start\": 0,\n \"end\": 0,\n \"size\": 0\n }\n }\n ],\n \"totalChunks\": 0,\n \"totalSize\": 0\n },\n \"downloadFileType\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fungies.io/v0/offers/{offerId}/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-fngs-public-key"] = '<api-key>'
request["x-fngs-secret-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"\",\n \"cover\": \"<string>\",\n \"coverBlurHash\": \"<string>\",\n \"price\": 8.988465674311579e+307,\n \"originalPrice\": 8.988465674311579e+307,\n \"freeProduct\": false,\n \"limit\": 4503599627370495,\n \"platform\": \"Global\",\n \"recurringIntervalCount\": 4503599627370496,\n \"trialIntervalCount\": 4503599627370496,\n \"gtin\": \"<string>\",\n \"externalId\": \"<string>\",\n \"variantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"variantIdx\": 0,\n \"fileName\": \"<string>\",\n \"downloadFile\": \"<string>\",\n \"downloadFileName\": \"<string>\",\n \"downloadFileSize\": 0,\n \"downloadDescription\": \"<string>\",\n \"productKeys\": [\n \"<string>\"\n ],\n \"hasDiscount\": true,\n \"warningMessage\": \"<string>\",\n \"mutableQuantity\": true,\n \"tags\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\"\n }\n ],\n \"downloadFileData\": {\n \"chunks\": [\n {\n \"chunk\": \"<string>\",\n \"metadata\": {\n \"number\": 0,\n \"start\": 0,\n \"end\": 0,\n \"size\": 0\n }\n }\n ],\n \"totalChunks\": 0,\n \"totalSize\": 0\n },\n \"downloadFileType\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"data": {
"offer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 0,
"object": "offer",
"internalId": null,
"originalPrice": null,
"recurringInterval": null,
"recurringIntervalCount": null,
"trialInterval": null,
"trialIntervalCount": null,
"limit": null,
"soldItems": 0,
"status": "DRAFT",
"name": null,
"description": null,
"region": null,
"platform": null,
"gtin": null,
"warningMessage": null
}
}
}{
"status": "error",
"error": {
"message": "Sample error message"
}
}offers
Update an offer
Update an existing offer’s details.
Can modify name, price, and settings. Note that changing pricing on an active offer may affect existing subscription customers depending on your configuration.
PATCH
/
v0
/
offers
/
{offerId}
/
update
Update an offer
curl --request PATCH \
--url https://api.fungies.io/v0/offers/{offerId}/update \
--header 'Content-Type: application/json' \
--header 'x-fngs-public-key: <api-key>' \
--header 'x-fngs-secret-key: <api-key>' \
--data '
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "",
"cover": "<string>",
"coverBlurHash": "<string>",
"price": 8.988465674311579e+307,
"originalPrice": 8.988465674311579e+307,
"freeProduct": false,
"limit": 4503599627370495,
"platform": "Global",
"recurringIntervalCount": 4503599627370496,
"trialIntervalCount": 4503599627370496,
"gtin": "<string>",
"externalId": "<string>",
"variantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"variantIdx": 0,
"fileName": "<string>",
"downloadFile": "<string>",
"downloadFileName": "<string>",
"downloadFileSize": 0,
"downloadDescription": "<string>",
"productKeys": [
"<string>"
],
"hasDiscount": true,
"warningMessage": "<string>",
"mutableQuantity": true,
"tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"downloadFileData": {
"chunks": [
{
"chunk": "<string>",
"metadata": {
"number": 0,
"start": 0,
"end": 0,
"size": 0
}
}
],
"totalChunks": 0,
"totalSize": 0
},
"downloadFileType": "<string>"
}
'import requests
url = "https://api.fungies.io/v0/offers/{offerId}/update"
payload = {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "",
"cover": "<string>",
"coverBlurHash": "<string>",
"price": 8.988465674311579e+307,
"originalPrice": 8.988465674311579e+307,
"freeProduct": False,
"limit": 4503599627370495,
"platform": "Global",
"recurringIntervalCount": 4503599627370496,
"trialIntervalCount": 4503599627370496,
"gtin": "<string>",
"externalId": "<string>",
"variantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"variantIdx": 0,
"fileName": "<string>",
"downloadFile": "<string>",
"downloadFileName": "<string>",
"downloadFileSize": 0,
"downloadDescription": "<string>",
"productKeys": ["<string>"],
"hasDiscount": True,
"warningMessage": "<string>",
"mutableQuantity": True,
"tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"downloadFileData": {
"chunks": [
{
"chunk": "<string>",
"metadata": {
"number": 0,
"start": 0,
"end": 0,
"size": 0
}
}
],
"totalChunks": 0,
"totalSize": 0
},
"downloadFileType": "<string>"
}
headers = {
"x-fngs-public-key": "<api-key>",
"x-fngs-secret-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-fngs-public-key': '<api-key>',
'x-fngs-secret-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
description: '',
cover: '<string>',
coverBlurHash: '<string>',
price: 8.988465674311579e+307,
originalPrice: 8.988465674311579e+307,
freeProduct: false,
limit: 4503599627370495,
platform: 'Global',
recurringIntervalCount: 4503599627370496,
trialIntervalCount: 4503599627370496,
gtin: '<string>',
externalId: '<string>',
variantId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
variantIdx: 0,
fileName: '<string>',
downloadFile: '<string>',
downloadFileName: '<string>',
downloadFileSize: 0,
downloadDescription: '<string>',
productKeys: ['<string>'],
hasDiscount: true,
warningMessage: '<string>',
mutableQuantity: true,
tags: [{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', name: '<string>'}],
downloadFileData: {
chunks: [{chunk: '<string>', metadata: {number: 0, start: 0, end: 0, size: 0}}],
totalChunks: 0,
totalSize: 0
},
downloadFileType: '<string>'
})
};
fetch('https://api.fungies.io/v0/offers/{offerId}/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fungies.io/v0/offers/{offerId}/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'description' => '',
'cover' => '<string>',
'coverBlurHash' => '<string>',
'price' => 8.988465674311579e+307,
'originalPrice' => 8.988465674311579e+307,
'freeProduct' => false,
'limit' => 4503599627370495,
'platform' => 'Global',
'recurringIntervalCount' => 4503599627370496,
'trialIntervalCount' => 4503599627370496,
'gtin' => '<string>',
'externalId' => '<string>',
'variantId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'variantIdx' => 0,
'fileName' => '<string>',
'downloadFile' => '<string>',
'downloadFileName' => '<string>',
'downloadFileSize' => 0,
'downloadDescription' => '<string>',
'productKeys' => [
'<string>'
],
'hasDiscount' => true,
'warningMessage' => '<string>',
'mutableQuantity' => true,
'tags' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>'
]
],
'downloadFileData' => [
'chunks' => [
[
'chunk' => '<string>',
'metadata' => [
'number' => 0,
'start' => 0,
'end' => 0,
'size' => 0
]
]
],
'totalChunks' => 0,
'totalSize' => 0
],
'downloadFileType' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-fngs-public-key: <api-key>",
"x-fngs-secret-key: <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://api.fungies.io/v0/offers/{offerId}/update"
payload := strings.NewReader("{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"\",\n \"cover\": \"<string>\",\n \"coverBlurHash\": \"<string>\",\n \"price\": 8.988465674311579e+307,\n \"originalPrice\": 8.988465674311579e+307,\n \"freeProduct\": false,\n \"limit\": 4503599627370495,\n \"platform\": \"Global\",\n \"recurringIntervalCount\": 4503599627370496,\n \"trialIntervalCount\": 4503599627370496,\n \"gtin\": \"<string>\",\n \"externalId\": \"<string>\",\n \"variantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"variantIdx\": 0,\n \"fileName\": \"<string>\",\n \"downloadFile\": \"<string>\",\n \"downloadFileName\": \"<string>\",\n \"downloadFileSize\": 0,\n \"downloadDescription\": \"<string>\",\n \"productKeys\": [\n \"<string>\"\n ],\n \"hasDiscount\": true,\n \"warningMessage\": \"<string>\",\n \"mutableQuantity\": true,\n \"tags\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\"\n }\n ],\n \"downloadFileData\": {\n \"chunks\": [\n {\n \"chunk\": \"<string>\",\n \"metadata\": {\n \"number\": 0,\n \"start\": 0,\n \"end\": 0,\n \"size\": 0\n }\n }\n ],\n \"totalChunks\": 0,\n \"totalSize\": 0\n },\n \"downloadFileType\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-fngs-public-key", "<api-key>")
req.Header.Add("x-fngs-secret-key", "<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))
}HttpResponse<String> response = Unirest.patch("https://api.fungies.io/v0/offers/{offerId}/update")
.header("x-fngs-public-key", "<api-key>")
.header("x-fngs-secret-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"\",\n \"cover\": \"<string>\",\n \"coverBlurHash\": \"<string>\",\n \"price\": 8.988465674311579e+307,\n \"originalPrice\": 8.988465674311579e+307,\n \"freeProduct\": false,\n \"limit\": 4503599627370495,\n \"platform\": \"Global\",\n \"recurringIntervalCount\": 4503599627370496,\n \"trialIntervalCount\": 4503599627370496,\n \"gtin\": \"<string>\",\n \"externalId\": \"<string>\",\n \"variantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"variantIdx\": 0,\n \"fileName\": \"<string>\",\n \"downloadFile\": \"<string>\",\n \"downloadFileName\": \"<string>\",\n \"downloadFileSize\": 0,\n \"downloadDescription\": \"<string>\",\n \"productKeys\": [\n \"<string>\"\n ],\n \"hasDiscount\": true,\n \"warningMessage\": \"<string>\",\n \"mutableQuantity\": true,\n \"tags\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\"\n }\n ],\n \"downloadFileData\": {\n \"chunks\": [\n {\n \"chunk\": \"<string>\",\n \"metadata\": {\n \"number\": 0,\n \"start\": 0,\n \"end\": 0,\n \"size\": 0\n }\n }\n ],\n \"totalChunks\": 0,\n \"totalSize\": 0\n },\n \"downloadFileType\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fungies.io/v0/offers/{offerId}/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-fngs-public-key"] = '<api-key>'
request["x-fngs-secret-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"\",\n \"cover\": \"<string>\",\n \"coverBlurHash\": \"<string>\",\n \"price\": 8.988465674311579e+307,\n \"originalPrice\": 8.988465674311579e+307,\n \"freeProduct\": false,\n \"limit\": 4503599627370495,\n \"platform\": \"Global\",\n \"recurringIntervalCount\": 4503599627370496,\n \"trialIntervalCount\": 4503599627370496,\n \"gtin\": \"<string>\",\n \"externalId\": \"<string>\",\n \"variantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"variantIdx\": 0,\n \"fileName\": \"<string>\",\n \"downloadFile\": \"<string>\",\n \"downloadFileName\": \"<string>\",\n \"downloadFileSize\": 0,\n \"downloadDescription\": \"<string>\",\n \"productKeys\": [\n \"<string>\"\n ],\n \"hasDiscount\": true,\n \"warningMessage\": \"<string>\",\n \"mutableQuantity\": true,\n \"tags\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\"\n }\n ],\n \"downloadFileData\": {\n \"chunks\": [\n {\n \"chunk\": \"<string>\",\n \"metadata\": {\n \"number\": 0,\n \"start\": 0,\n \"end\": 0,\n \"size\": 0\n }\n }\n ],\n \"totalChunks\": 0,\n \"totalSize\": 0\n },\n \"downloadFileType\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"data": {
"offer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 0,
"object": "offer",
"internalId": null,
"originalPrice": null,
"recurringInterval": null,
"recurringIntervalCount": null,
"trialInterval": null,
"trialIntervalCount": null,
"limit": null,
"soldItems": 0,
"status": "DRAFT",
"name": null,
"description": null,
"region": null,
"platform": null,
"gtin": null,
"warningMessage": null
}
}
}{
"status": "error",
"error": {
"message": "Sample error message"
}
}Body
application/json
PATCH /v0/offers/:offerId/update Request body
Required string length:
1 - 150Available options:
AFN, ALL, DZD, AOA, ARS, AMD, AWG, AUD, AZN, BSD, BDT, BBD, BZD, BMD, BOB, BAM, BWP, BRL, BHD, GBP, BND, BGN, BIF, BYN, KHR, CAD, CVE, KYD, KWD, XAF, XPF, CLP, CNY, COP, KMF, CDF, CRC, HRK, CZK, DKK, DJF, DOP, XCD, EGP, ETB, EUR, FKP, FJD, GMD, GEL, GIP, GTQ, GNF, GYD, HTG, HNL, HKD, HUF, ISK, INR, IDR, ILS, JMD, JPY, JOD, KZT, KES, KGS, LAK, LBP, LSL, LRD, MOP, MKD, MGA, MWK, MYR, MVR, MRO, MUR, MXN, MDL, MNT, MAD, MZN, MMK, NAD, NPR, ANG, TWD, NZD, NIO, NGN, NOK, OMR, PKR, PAB, PGK, PYG, PEN, PHP, PLN, QAR, RON, RUB, RWF, SHP, SVC, WST, STD, SAR, RSD, SCR, SLL, SGD, SBD, SOS, ZAR, KRW, LKR, SRD, SZL, SEK, CHF, TJS, TZS, THB, TND, TOP, TTD, TRY, UGX, UAH, AED, UYU, USD, UZS, VUV, VEF, VND, XOF, YER, ZMW, SLE, XCG, SSP, VES, MRU, STN, VED Required range:
0 <= x <= 1.7976931348623157e+308Required range:
0 <= x <= 1.7976931348623157e+308Required range:
0 <= x <= 9007199254740991Available options:
Global, Europe, Argentina, United States, Turkey, United Kingdom, Latin America, Brazil, Canada, Mexico, Germany, Colombia, France, Saudi Arabia, Australia, Spain, India, Italy, Netherlands, United Arab Emirates, North America, Poland, Belgium, Asia, Egypt, Austria, Singapore, EMEA, Ireland, RU/CIS, Sweden, Portugal, Switzerland, New Zealand, Malaysia, Finland, Greece, Norway, Denmark, Japan, Hong Kong, Philippines, Middle East, Indonesia, Czech Republic, South Africa, South Korea, Luxembourg, Slovakia, Romania, Slovenia, Hungary, Chile, Nigeria, Thailand, Kuwait, Vietnam, Rest of the World, Bahrain, Qatar Available options:
Meta Quest, TV, Music, Tidal, Tinder, Zalando, Razer, Netflix, Spotify, Walmart, Amazon, Food, Prepaid, Steam, Xbox Live, Origin, PSN, Ubisoft Connect, Nintendo, Official Website, GOG.com, Epic Games, Windows Store, Battle.net, Riot Games, Steam Gift Card, Roblox, Green gift, EA App, Rockstar Games Launcher, ArenaNet, PUBG, App Store, Google Play, Mobile, Other, Rockstar Available options:
day, month, week, year Required range:
1 <= x <= 9007199254740991Available options:
day, month, week, year Required range:
1 <= x <= 9007199254740991Required range:
-9007199254740991 <= x <= 9007199254740991Required range:
-1.7976931348623157e+308 <= x <= 1.7976931348623157e+308Minimum string length:
1Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I