enrollment-packs
Create a new enrollment pack
POST
/
api
/
enrollment_packs
Create a new enrollment pack
curl --request POST \
--url https://api.fluid.app/api/enrollment_packs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enrollment_pack": {
"title": "<string>",
"description": "<string>",
"slug": "<string>",
"custom_slug": true,
"active": true,
"membership_after_one_month": true,
"membership_optional": true,
"enrollment_fee": 123,
"application_theme_template_id": 123,
"country_ids": [
123
],
"additional_volume": 123,
"search_engine_optimizer_attributes": {
"title": "<string>",
"description": "<string>",
"image_url": "<string>",
"image_path": "<string>",
"block_crawler": true
},
"member_enrollable_products_attributes": [
{
"variant_id": 123
}
],
"subscription_enrollable_products_attributes": [
{
"variant_id": 123,
"subscription_plan_id": 123
}
],
"images_attributes": [
{
"image_url": "<string>",
"position": 123
}
],
"enrollment_pack_agreements": [
{
"agreement_id": 123,
"required": true
}
]
},
"language_iso": "<string>"
}
'import requests
url = "https://api.fluid.app/api/enrollment_packs"
payload = {
"enrollment_pack": {
"title": "<string>",
"description": "<string>",
"slug": "<string>",
"custom_slug": True,
"active": True,
"membership_after_one_month": True,
"membership_optional": True,
"enrollment_fee": 123,
"application_theme_template_id": 123,
"country_ids": [123],
"additional_volume": 123,
"search_engine_optimizer_attributes": {
"title": "<string>",
"description": "<string>",
"image_url": "<string>",
"image_path": "<string>",
"block_crawler": True
},
"member_enrollable_products_attributes": [{ "variant_id": 123 }],
"subscription_enrollable_products_attributes": [
{
"variant_id": 123,
"subscription_plan_id": 123
}
],
"images_attributes": [
{
"image_url": "<string>",
"position": 123
}
],
"enrollment_pack_agreements": [
{
"agreement_id": 123,
"required": True
}
]
},
"language_iso": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enrollment_pack: {
title: '<string>',
description: '<string>',
slug: '<string>',
custom_slug: true,
active: true,
membership_after_one_month: true,
membership_optional: true,
enrollment_fee: 123,
application_theme_template_id: 123,
country_ids: [123],
additional_volume: 123,
search_engine_optimizer_attributes: {
title: '<string>',
description: '<string>',
image_url: '<string>',
image_path: '<string>',
block_crawler: true
},
member_enrollable_products_attributes: [{variant_id: 123}],
subscription_enrollable_products_attributes: [{variant_id: 123, subscription_plan_id: 123}],
images_attributes: [{image_url: '<string>', position: 123}],
enrollment_pack_agreements: [{agreement_id: 123, required: true}]
},
language_iso: '<string>'
})
};
fetch('https://api.fluid.app/api/enrollment_packs', 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.fluid.app/api/enrollment_packs",
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([
'enrollment_pack' => [
'title' => '<string>',
'description' => '<string>',
'slug' => '<string>',
'custom_slug' => true,
'active' => true,
'membership_after_one_month' => true,
'membership_optional' => true,
'enrollment_fee' => 123,
'application_theme_template_id' => 123,
'country_ids' => [
123
],
'additional_volume' => 123,
'search_engine_optimizer_attributes' => [
'title' => '<string>',
'description' => '<string>',
'image_url' => '<string>',
'image_path' => '<string>',
'block_crawler' => true
],
'member_enrollable_products_attributes' => [
[
'variant_id' => 123
]
],
'subscription_enrollable_products_attributes' => [
[
'variant_id' => 123,
'subscription_plan_id' => 123
]
],
'images_attributes' => [
[
'image_url' => '<string>',
'position' => 123
]
],
'enrollment_pack_agreements' => [
[
'agreement_id' => 123,
'required' => true
]
]
],
'language_iso' => '<string>'
]),
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://api.fluid.app/api/enrollment_packs"
payload := strings.NewReader("{\n \"enrollment_pack\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"slug\": \"<string>\",\n \"custom_slug\": true,\n \"active\": true,\n \"membership_after_one_month\": true,\n \"membership_optional\": true,\n \"enrollment_fee\": 123,\n \"application_theme_template_id\": 123,\n \"country_ids\": [\n 123\n ],\n \"additional_volume\": 123,\n \"search_engine_optimizer_attributes\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"image_url\": \"<string>\",\n \"image_path\": \"<string>\",\n \"block_crawler\": true\n },\n \"member_enrollable_products_attributes\": [\n {\n \"variant_id\": 123\n }\n ],\n \"subscription_enrollable_products_attributes\": [\n {\n \"variant_id\": 123,\n \"subscription_plan_id\": 123\n }\n ],\n \"images_attributes\": [\n {\n \"image_url\": \"<string>\",\n \"position\": 123\n }\n ],\n \"enrollment_pack_agreements\": [\n {\n \"agreement_id\": 123,\n \"required\": true\n }\n ]\n },\n \"language_iso\": \"<string>\"\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))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/enrollment_packs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enrollment_pack\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"slug\": \"<string>\",\n \"custom_slug\": true,\n \"active\": true,\n \"membership_after_one_month\": true,\n \"membership_optional\": true,\n \"enrollment_fee\": 123,\n \"application_theme_template_id\": 123,\n \"country_ids\": [\n 123\n ],\n \"additional_volume\": 123,\n \"search_engine_optimizer_attributes\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"image_url\": \"<string>\",\n \"image_path\": \"<string>\",\n \"block_crawler\": true\n },\n \"member_enrollable_products_attributes\": [\n {\n \"variant_id\": 123\n }\n ],\n \"subscription_enrollable_products_attributes\": [\n {\n \"variant_id\": 123,\n \"subscription_plan_id\": 123\n }\n ],\n \"images_attributes\": [\n {\n \"image_url\": \"<string>\",\n \"position\": 123\n }\n ],\n \"enrollment_pack_agreements\": [\n {\n \"agreement_id\": 123,\n \"required\": true\n }\n ]\n },\n \"language_iso\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/enrollment_packs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enrollment_pack\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"slug\": \"<string>\",\n \"custom_slug\": true,\n \"active\": true,\n \"membership_after_one_month\": true,\n \"membership_optional\": true,\n \"enrollment_fee\": 123,\n \"application_theme_template_id\": 123,\n \"country_ids\": [\n 123\n ],\n \"additional_volume\": 123,\n \"search_engine_optimizer_attributes\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"image_url\": \"<string>\",\n \"image_path\": \"<string>\",\n \"block_crawler\": true\n },\n \"member_enrollable_products_attributes\": [\n {\n \"variant_id\": 123\n }\n ],\n \"subscription_enrollable_products_attributes\": [\n {\n \"variant_id\": 123,\n \"subscription_plan_id\": 123\n }\n ],\n \"images_attributes\": [\n {\n \"image_url\": \"<string>\",\n \"position\": 123\n }\n ],\n \"enrollment_pack_agreements\": [\n {\n \"agreement_id\": 123,\n \"required\": true\n }\n ]\n },\n \"language_iso\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"enrollment_pack": {
"enrollment_pack_id": 123,
"slug": "<string>",
"custom_slug": true,
"canonical_url": "<string>",
"search_engine_optimizer": {
"id": 123,
"title": "<string>",
"description": "<string>",
"image_url": "<string>",
"image_path": "<string>",
"block_crawler": true
},
"token": "<string>",
"title": "<string>",
"active": true,
"description": {
"id": 123,
"name": "<string>",
"body": "<string>",
"locale": "<string>",
"record_type": "<string>",
"record_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"enrollment_fee": "<string>",
"membership_after_one_month": true,
"membership_optional": true,
"status": "<string>",
"additional_volume": 123,
"application_theme_template_id": 123,
"country_ids": [
123
],
"member_enrollable_products": [
{
"id": 123,
"product_id": 123,
"variant_id": 123
}
],
"subscription_enrollable_products": [
{
"id": 123,
"product_id": 123,
"variant_id": 123,
"subscription_plan_id": 123
}
],
"images": [
{
"id": 123,
"image_url": "<string>",
"position": 123
}
],
"enrollment_pack_agreements": [
{
"id": 123,
"agreement_id": 123,
"required": true
}
]
},
"meta": {
"request_id": "<string>",
"timestamp": "<string>"
}
}{
"message": "<string>"
}Authorizations
Bearer token authentication
Body
application/json
⌘I
Create a new enrollment pack
curl --request POST \
--url https://api.fluid.app/api/enrollment_packs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enrollment_pack": {
"title": "<string>",
"description": "<string>",
"slug": "<string>",
"custom_slug": true,
"active": true,
"membership_after_one_month": true,
"membership_optional": true,
"enrollment_fee": 123,
"application_theme_template_id": 123,
"country_ids": [
123
],
"additional_volume": 123,
"search_engine_optimizer_attributes": {
"title": "<string>",
"description": "<string>",
"image_url": "<string>",
"image_path": "<string>",
"block_crawler": true
},
"member_enrollable_products_attributes": [
{
"variant_id": 123
}
],
"subscription_enrollable_products_attributes": [
{
"variant_id": 123,
"subscription_plan_id": 123
}
],
"images_attributes": [
{
"image_url": "<string>",
"position": 123
}
],
"enrollment_pack_agreements": [
{
"agreement_id": 123,
"required": true
}
]
},
"language_iso": "<string>"
}
'import requests
url = "https://api.fluid.app/api/enrollment_packs"
payload = {
"enrollment_pack": {
"title": "<string>",
"description": "<string>",
"slug": "<string>",
"custom_slug": True,
"active": True,
"membership_after_one_month": True,
"membership_optional": True,
"enrollment_fee": 123,
"application_theme_template_id": 123,
"country_ids": [123],
"additional_volume": 123,
"search_engine_optimizer_attributes": {
"title": "<string>",
"description": "<string>",
"image_url": "<string>",
"image_path": "<string>",
"block_crawler": True
},
"member_enrollable_products_attributes": [{ "variant_id": 123 }],
"subscription_enrollable_products_attributes": [
{
"variant_id": 123,
"subscription_plan_id": 123
}
],
"images_attributes": [
{
"image_url": "<string>",
"position": 123
}
],
"enrollment_pack_agreements": [
{
"agreement_id": 123,
"required": True
}
]
},
"language_iso": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enrollment_pack: {
title: '<string>',
description: '<string>',
slug: '<string>',
custom_slug: true,
active: true,
membership_after_one_month: true,
membership_optional: true,
enrollment_fee: 123,
application_theme_template_id: 123,
country_ids: [123],
additional_volume: 123,
search_engine_optimizer_attributes: {
title: '<string>',
description: '<string>',
image_url: '<string>',
image_path: '<string>',
block_crawler: true
},
member_enrollable_products_attributes: [{variant_id: 123}],
subscription_enrollable_products_attributes: [{variant_id: 123, subscription_plan_id: 123}],
images_attributes: [{image_url: '<string>', position: 123}],
enrollment_pack_agreements: [{agreement_id: 123, required: true}]
},
language_iso: '<string>'
})
};
fetch('https://api.fluid.app/api/enrollment_packs', 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.fluid.app/api/enrollment_packs",
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([
'enrollment_pack' => [
'title' => '<string>',
'description' => '<string>',
'slug' => '<string>',
'custom_slug' => true,
'active' => true,
'membership_after_one_month' => true,
'membership_optional' => true,
'enrollment_fee' => 123,
'application_theme_template_id' => 123,
'country_ids' => [
123
],
'additional_volume' => 123,
'search_engine_optimizer_attributes' => [
'title' => '<string>',
'description' => '<string>',
'image_url' => '<string>',
'image_path' => '<string>',
'block_crawler' => true
],
'member_enrollable_products_attributes' => [
[
'variant_id' => 123
]
],
'subscription_enrollable_products_attributes' => [
[
'variant_id' => 123,
'subscription_plan_id' => 123
]
],
'images_attributes' => [
[
'image_url' => '<string>',
'position' => 123
]
],
'enrollment_pack_agreements' => [
[
'agreement_id' => 123,
'required' => true
]
]
],
'language_iso' => '<string>'
]),
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://api.fluid.app/api/enrollment_packs"
payload := strings.NewReader("{\n \"enrollment_pack\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"slug\": \"<string>\",\n \"custom_slug\": true,\n \"active\": true,\n \"membership_after_one_month\": true,\n \"membership_optional\": true,\n \"enrollment_fee\": 123,\n \"application_theme_template_id\": 123,\n \"country_ids\": [\n 123\n ],\n \"additional_volume\": 123,\n \"search_engine_optimizer_attributes\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"image_url\": \"<string>\",\n \"image_path\": \"<string>\",\n \"block_crawler\": true\n },\n \"member_enrollable_products_attributes\": [\n {\n \"variant_id\": 123\n }\n ],\n \"subscription_enrollable_products_attributes\": [\n {\n \"variant_id\": 123,\n \"subscription_plan_id\": 123\n }\n ],\n \"images_attributes\": [\n {\n \"image_url\": \"<string>\",\n \"position\": 123\n }\n ],\n \"enrollment_pack_agreements\": [\n {\n \"agreement_id\": 123,\n \"required\": true\n }\n ]\n },\n \"language_iso\": \"<string>\"\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))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/enrollment_packs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enrollment_pack\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"slug\": \"<string>\",\n \"custom_slug\": true,\n \"active\": true,\n \"membership_after_one_month\": true,\n \"membership_optional\": true,\n \"enrollment_fee\": 123,\n \"application_theme_template_id\": 123,\n \"country_ids\": [\n 123\n ],\n \"additional_volume\": 123,\n \"search_engine_optimizer_attributes\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"image_url\": \"<string>\",\n \"image_path\": \"<string>\",\n \"block_crawler\": true\n },\n \"member_enrollable_products_attributes\": [\n {\n \"variant_id\": 123\n }\n ],\n \"subscription_enrollable_products_attributes\": [\n {\n \"variant_id\": 123,\n \"subscription_plan_id\": 123\n }\n ],\n \"images_attributes\": [\n {\n \"image_url\": \"<string>\",\n \"position\": 123\n }\n ],\n \"enrollment_pack_agreements\": [\n {\n \"agreement_id\": 123,\n \"required\": true\n }\n ]\n },\n \"language_iso\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/enrollment_packs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enrollment_pack\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"slug\": \"<string>\",\n \"custom_slug\": true,\n \"active\": true,\n \"membership_after_one_month\": true,\n \"membership_optional\": true,\n \"enrollment_fee\": 123,\n \"application_theme_template_id\": 123,\n \"country_ids\": [\n 123\n ],\n \"additional_volume\": 123,\n \"search_engine_optimizer_attributes\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"image_url\": \"<string>\",\n \"image_path\": \"<string>\",\n \"block_crawler\": true\n },\n \"member_enrollable_products_attributes\": [\n {\n \"variant_id\": 123\n }\n ],\n \"subscription_enrollable_products_attributes\": [\n {\n \"variant_id\": 123,\n \"subscription_plan_id\": 123\n }\n ],\n \"images_attributes\": [\n {\n \"image_url\": \"<string>\",\n \"position\": 123\n }\n ],\n \"enrollment_pack_agreements\": [\n {\n \"agreement_id\": 123,\n \"required\": true\n }\n ]\n },\n \"language_iso\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"enrollment_pack": {
"enrollment_pack_id": 123,
"slug": "<string>",
"custom_slug": true,
"canonical_url": "<string>",
"search_engine_optimizer": {
"id": 123,
"title": "<string>",
"description": "<string>",
"image_url": "<string>",
"image_path": "<string>",
"block_crawler": true
},
"token": "<string>",
"title": "<string>",
"active": true,
"description": {
"id": 123,
"name": "<string>",
"body": "<string>",
"locale": "<string>",
"record_type": "<string>",
"record_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"enrollment_fee": "<string>",
"membership_after_one_month": true,
"membership_optional": true,
"status": "<string>",
"additional_volume": 123,
"application_theme_template_id": 123,
"country_ids": [
123
],
"member_enrollable_products": [
{
"id": 123,
"product_id": 123,
"variant_id": 123
}
],
"subscription_enrollable_products": [
{
"id": 123,
"product_id": 123,
"variant_id": 123,
"subscription_plan_id": 123
}
],
"images": [
{
"id": 123,
"image_url": "<string>",
"position": 123
}
],
"enrollment_pack_agreements": [
{
"id": 123,
"agreement_id": 123,
"required": true
}
]
},
"meta": {
"request_id": "<string>",
"timestamp": "<string>"
}
}{
"message": "<string>"
}