Create Product Bundle
curl --request POST \
--url https://api.meetcampfire.com/rr/api/v1/product-bundles \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"bundle_name": "<string>",
"lines": [
{
"product": 123,
"percentage_allocation": 50.005
}
],
"bundle_description": "<string>",
"stripe_product_id": "<string>"
}
'import requests
url = "https://api.meetcampfire.com/rr/api/v1/product-bundles"
payload = {
"bundle_name": "<string>",
"lines": [
{
"product": 123,
"percentage_allocation": 50.005
}
],
"bundle_description": "<string>",
"stripe_product_id": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
bundle_name: '<string>',
lines: [{product: 123, percentage_allocation: 50.005}],
bundle_description: '<string>',
stripe_product_id: '<string>'
})
};
fetch('https://api.meetcampfire.com/rr/api/v1/product-bundles', 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.meetcampfire.com/rr/api/v1/product-bundles",
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([
'bundle_name' => '<string>',
'lines' => [
[
'product' => 123,
'percentage_allocation' => 50.005
]
],
'bundle_description' => '<string>',
'stripe_product_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.meetcampfire.com/rr/api/v1/product-bundles"
payload := strings.NewReader("{\n \"bundle_name\": \"<string>\",\n \"lines\": [\n {\n \"product\": 123,\n \"percentage_allocation\": 50.005\n }\n ],\n \"bundle_description\": \"<string>\",\n \"stripe_product_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.post("https://api.meetcampfire.com/rr/api/v1/product-bundles")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"bundle_name\": \"<string>\",\n \"lines\": [\n {\n \"product\": 123,\n \"percentage_allocation\": 50.005\n }\n ],\n \"bundle_description\": \"<string>\",\n \"stripe_product_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/rr/api/v1/product-bundles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bundle_name\": \"<string>\",\n \"lines\": [\n {\n \"product\": 123,\n \"percentage_allocation\": 50.005\n }\n ],\n \"bundle_description\": \"<string>\",\n \"stripe_product_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"bundle_name": "<string>",
"anrok_item_id": "<string>",
"lines": [
{
"id": 123,
"product": 123,
"product_name": "<string>",
"product_id_str": "<string>",
"percentage_allocation": 50.005
}
],
"created_at": "2023-11-07T05:31:56Z",
"last_modified_at": "2023-11-07T05:31:56Z",
"is_deleted": false,
"deleted_at": "2023-11-07T05:31:56Z",
"bundle_description": "<string>",
"stripe_product_id": "<string>"
}Revenue Recognition
Create Product Bundle
Create a new product bundle with products and percentage allocations. Total percentage must equal 100.
POST
/
rr
/
api
/
v1
/
product-bundles
Create Product Bundle
curl --request POST \
--url https://api.meetcampfire.com/rr/api/v1/product-bundles \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"bundle_name": "<string>",
"lines": [
{
"product": 123,
"percentage_allocation": 50.005
}
],
"bundle_description": "<string>",
"stripe_product_id": "<string>"
}
'import requests
url = "https://api.meetcampfire.com/rr/api/v1/product-bundles"
payload = {
"bundle_name": "<string>",
"lines": [
{
"product": 123,
"percentage_allocation": 50.005
}
],
"bundle_description": "<string>",
"stripe_product_id": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
bundle_name: '<string>',
lines: [{product: 123, percentage_allocation: 50.005}],
bundle_description: '<string>',
stripe_product_id: '<string>'
})
};
fetch('https://api.meetcampfire.com/rr/api/v1/product-bundles', 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.meetcampfire.com/rr/api/v1/product-bundles",
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([
'bundle_name' => '<string>',
'lines' => [
[
'product' => 123,
'percentage_allocation' => 50.005
]
],
'bundle_description' => '<string>',
'stripe_product_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.meetcampfire.com/rr/api/v1/product-bundles"
payload := strings.NewReader("{\n \"bundle_name\": \"<string>\",\n \"lines\": [\n {\n \"product\": 123,\n \"percentage_allocation\": 50.005\n }\n ],\n \"bundle_description\": \"<string>\",\n \"stripe_product_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.post("https://api.meetcampfire.com/rr/api/v1/product-bundles")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"bundle_name\": \"<string>\",\n \"lines\": [\n {\n \"product\": 123,\n \"percentage_allocation\": 50.005\n }\n ],\n \"bundle_description\": \"<string>\",\n \"stripe_product_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/rr/api/v1/product-bundles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bundle_name\": \"<string>\",\n \"lines\": [\n {\n \"product\": 123,\n \"percentage_allocation\": 50.005\n }\n ],\n \"bundle_description\": \"<string>\",\n \"stripe_product_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"bundle_name": "<string>",
"anrok_item_id": "<string>",
"lines": [
{
"id": 123,
"product": 123,
"product_name": "<string>",
"product_id_str": "<string>",
"percentage_allocation": 50.005
}
],
"created_at": "2023-11-07T05:31:56Z",
"last_modified_at": "2023-11-07T05:31:56Z",
"is_deleted": false,
"deleted_at": "2023-11-07T05:31:56Z",
"bundle_description": "<string>",
"stripe_product_id": "<string>"
}Authorizations
Token-based authentication with required prefix "Token"
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Response
201 - application/json
Maximum string length:
250Show child attributes
Show child attributes
Maximum string length:
250Maximum string length:
255⌘I