curl --request POST \
--url https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/events/{event} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
"{ \"object\": \"Event\", \"id\": \"event_223\", \"date_received\": \"2023-01-17T10:46:33-08:00\", \"event_date\": \"2023-01-18T00:00:00-08:00\", \"subscription_item\": { \"object\": \"SubscriptionItem\", \"vid\": \"d9f215896f53e9ee8461d5e32c6d14e840714128\" }, \"subscription\": { \"object\": \"Subscription\", \"id\": \"sub_12345\", \"vid\": \"beaff07323d3245936e2f062e5ceee7db778c891\" }, \"account\": { \"object\": \"Account\", \"id\": \"cust_2234\", \"vid\": \"c992135bc246474d66479fed89826aaaf6f7f572\" }, \"product\": { \"object\": \"Product\", \"id\": \"prod_1234\", \"vid\": \"ee6e14b60f5acd479aa0eb13077cbf31a854a3eb\" }, \"billed_status\": \"Billed\" }"
'import requests
url = "https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/events/{event}"
payload = "{ \"object\": \"Event\", \"id\": \"event_223\", \"date_received\": \"2023-01-17T10:46:33-08:00\", \"event_date\": \"2023-01-18T00:00:00-08:00\", \"subscription_item\": { \"object\": \"SubscriptionItem\", \"vid\": \"d9f215896f53e9ee8461d5e32c6d14e840714128\" }, \"subscription\": { \"object\": \"Subscription\", \"id\": \"sub_12345\", \"vid\": \"beaff07323d3245936e2f062e5ceee7db778c891\" }, \"account\": { \"object\": \"Account\", \"id\": \"cust_2234\", \"vid\": \"c992135bc246474d66479fed89826aaaf6f7f572\" }, \"product\": { \"object\": \"Product\", \"id\": \"prod_1234\", \"vid\": \"ee6e14b60f5acd479aa0eb13077cbf31a854a3eb\" }, \"billed_status\": \"Billed\" }"
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify('{ "object": "Event", "id": "event_223", "date_received": "2023-01-17T10:46:33-08:00", "event_date": "2023-01-18T00:00:00-08:00", "subscription_item": { "object": "SubscriptionItem", "vid": "d9f215896f53e9ee8461d5e32c6d14e840714128" }, "subscription": { "object": "Subscription", "id": "sub_12345", "vid": "beaff07323d3245936e2f062e5ceee7db778c891" }, "account": { "object": "Account", "id": "cust_2234", "vid": "c992135bc246474d66479fed89826aaaf6f7f572" }, "product": { "object": "Product", "id": "prod_1234", "vid": "ee6e14b60f5acd479aa0eb13077cbf31a854a3eb" }, "billed_status": "Billed" }')
};
fetch('https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/events/{event}', 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://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/events/{event}",
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('{ "object": "Event", "id": "event_223", "date_received": "2023-01-17T10:46:33-08:00", "event_date": "2023-01-18T00:00:00-08:00", "subscription_item": { "object": "SubscriptionItem", "vid": "d9f215896f53e9ee8461d5e32c6d14e840714128" }, "subscription": { "object": "Subscription", "id": "sub_12345", "vid": "beaff07323d3245936e2f062e5ceee7db778c891" }, "account": { "object": "Account", "id": "cust_2234", "vid": "c992135bc246474d66479fed89826aaaf6f7f572" }, "product": { "object": "Product", "id": "prod_1234", "vid": "ee6e14b60f5acd479aa0eb13077cbf31a854a3eb" }, "billed_status": "Billed" }'),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/events/{event}"
payload := strings.NewReader("\"{ \\\"object\\\": \\\"Event\\\", \\\"id\\\": \\\"event_223\\\", \\\"date_received\\\": \\\"2023-01-17T10:46:33-08:00\\\", \\\"event_date\\\": \\\"2023-01-18T00:00:00-08:00\\\", \\\"subscription_item\\\": { \\\"object\\\": \\\"SubscriptionItem\\\", \\\"vid\\\": \\\"d9f215896f53e9ee8461d5e32c6d14e840714128\\\" }, \\\"subscription\\\": { \\\"object\\\": \\\"Subscription\\\", \\\"id\\\": \\\"sub_12345\\\", \\\"vid\\\": \\\"beaff07323d3245936e2f062e5ceee7db778c891\\\" }, \\\"account\\\": { \\\"object\\\": \\\"Account\\\", \\\"id\\\": \\\"cust_2234\\\", \\\"vid\\\": \\\"c992135bc246474d66479fed89826aaaf6f7f572\\\" }, \\\"product\\\": { \\\"object\\\": \\\"Product\\\", \\\"id\\\": \\\"prod_1234\\\", \\\"vid\\\": \\\"ee6e14b60f5acd479aa0eb13077cbf31a854a3eb\\\" }, \\\"billed_status\\\": \\\"Billed\\\" }\"")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/events/{event}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("\"{ \\\"object\\\": \\\"Event\\\", \\\"id\\\": \\\"event_223\\\", \\\"date_received\\\": \\\"2023-01-17T10:46:33-08:00\\\", \\\"event_date\\\": \\\"2023-01-18T00:00:00-08:00\\\", \\\"subscription_item\\\": { \\\"object\\\": \\\"SubscriptionItem\\\", \\\"vid\\\": \\\"d9f215896f53e9ee8461d5e32c6d14e840714128\\\" }, \\\"subscription\\\": { \\\"object\\\": \\\"Subscription\\\", \\\"id\\\": \\\"sub_12345\\\", \\\"vid\\\": \\\"beaff07323d3245936e2f062e5ceee7db778c891\\\" }, \\\"account\\\": { \\\"object\\\": \\\"Account\\\", \\\"id\\\": \\\"cust_2234\\\", \\\"vid\\\": \\\"c992135bc246474d66479fed89826aaaf6f7f572\\\" }, \\\"product\\\": { \\\"object\\\": \\\"Product\\\", \\\"id\\\": \\\"prod_1234\\\", \\\"vid\\\": \\\"ee6e14b60f5acd479aa0eb13077cbf31a854a3eb\\\" }, \\\"billed_status\\\": \\\"Billed\\\" }\"")
.asString();require 'uri'
require 'net/http'
url = URI("https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/events/{event}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "\"{ \\\"object\\\": \\\"Event\\\", \\\"id\\\": \\\"event_223\\\", \\\"date_received\\\": \\\"2023-01-17T10:46:33-08:00\\\", \\\"event_date\\\": \\\"2023-01-18T00:00:00-08:00\\\", \\\"subscription_item\\\": { \\\"object\\\": \\\"SubscriptionItem\\\", \\\"vid\\\": \\\"d9f215896f53e9ee8461d5e32c6d14e840714128\\\" }, \\\"subscription\\\": { \\\"object\\\": \\\"Subscription\\\", \\\"id\\\": \\\"sub_12345\\\", \\\"vid\\\": \\\"beaff07323d3245936e2f062e5ceee7db778c891\\\" }, \\\"account\\\": { \\\"object\\\": \\\"Account\\\", \\\"id\\\": \\\"cust_2234\\\", \\\"vid\\\": \\\"c992135bc246474d66479fed89826aaaf6f7f572\\\" }, \\\"product\\\": { \\\"object\\\": \\\"Product\\\", \\\"id\\\": \\\"prod_1234\\\", \\\"vid\\\": \\\"ee6e14b60f5acd479aa0eb13077cbf31a854a3eb\\\" }, \\\"billed_status\\\": \\\"Billed\\\" }\""
response = http.request(request)
puts response.read_body"{ \"object\": \"Event\", \"id\": \"event_223\", \"vid\": \"5c2c034920a07825507017af8b7afcd96d18822a\", \"date_received\": \"2023-01-17T07:59:19+00:00\", \"event_date\": \"2023-01-18T00:00:00+00:00\", \"subscription_item\": { \"object\": \"SubscriptionItem\", \"id\": \"sub_12345.1\", \"vid\": \"d9f215896f53e9ee8461d5e32c6d14e840714128\" }, \"account\": { \"object\": \"Account\", \"id\": \"cust_2234\", \"vid\": \"c992135bc246474d66479fed89826aaaf6f7f572\" }, \"subscription\": { \"object\": \"Subscription\", \"id\": \"sub_12345\", \"vid\": \"53097bba3d9aa438efddcaaf3f7bddec97712636\" }, \"product\": { \"object\": \"Product\", \"id\": \"prod_1234\", \"vid\": \"ee6e14b60f5acd479aa0eb13077cbf31a854a3eb\" }, \"billed_status\": \"Billed\" }""{ \"object\": \"Error\", \"message\": \"JSON is invalid\" }"{
"code": "<string>",
"message": "<string>"
}"{ \"object\": \"Error\", \"message\": \"This endpoint does not exist. Check our API docs.\" }"Update or Edit an Event
Edit an existing event.
curl --request POST \
--url https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/events/{event} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
"{ \"object\": \"Event\", \"id\": \"event_223\", \"date_received\": \"2023-01-17T10:46:33-08:00\", \"event_date\": \"2023-01-18T00:00:00-08:00\", \"subscription_item\": { \"object\": \"SubscriptionItem\", \"vid\": \"d9f215896f53e9ee8461d5e32c6d14e840714128\" }, \"subscription\": { \"object\": \"Subscription\", \"id\": \"sub_12345\", \"vid\": \"beaff07323d3245936e2f062e5ceee7db778c891\" }, \"account\": { \"object\": \"Account\", \"id\": \"cust_2234\", \"vid\": \"c992135bc246474d66479fed89826aaaf6f7f572\" }, \"product\": { \"object\": \"Product\", \"id\": \"prod_1234\", \"vid\": \"ee6e14b60f5acd479aa0eb13077cbf31a854a3eb\" }, \"billed_status\": \"Billed\" }"
'import requests
url = "https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/events/{event}"
payload = "{ \"object\": \"Event\", \"id\": \"event_223\", \"date_received\": \"2023-01-17T10:46:33-08:00\", \"event_date\": \"2023-01-18T00:00:00-08:00\", \"subscription_item\": { \"object\": \"SubscriptionItem\", \"vid\": \"d9f215896f53e9ee8461d5e32c6d14e840714128\" }, \"subscription\": { \"object\": \"Subscription\", \"id\": \"sub_12345\", \"vid\": \"beaff07323d3245936e2f062e5ceee7db778c891\" }, \"account\": { \"object\": \"Account\", \"id\": \"cust_2234\", \"vid\": \"c992135bc246474d66479fed89826aaaf6f7f572\" }, \"product\": { \"object\": \"Product\", \"id\": \"prod_1234\", \"vid\": \"ee6e14b60f5acd479aa0eb13077cbf31a854a3eb\" }, \"billed_status\": \"Billed\" }"
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify('{ "object": "Event", "id": "event_223", "date_received": "2023-01-17T10:46:33-08:00", "event_date": "2023-01-18T00:00:00-08:00", "subscription_item": { "object": "SubscriptionItem", "vid": "d9f215896f53e9ee8461d5e32c6d14e840714128" }, "subscription": { "object": "Subscription", "id": "sub_12345", "vid": "beaff07323d3245936e2f062e5ceee7db778c891" }, "account": { "object": "Account", "id": "cust_2234", "vid": "c992135bc246474d66479fed89826aaaf6f7f572" }, "product": { "object": "Product", "id": "prod_1234", "vid": "ee6e14b60f5acd479aa0eb13077cbf31a854a3eb" }, "billed_status": "Billed" }')
};
fetch('https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/events/{event}', 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://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/events/{event}",
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('{ "object": "Event", "id": "event_223", "date_received": "2023-01-17T10:46:33-08:00", "event_date": "2023-01-18T00:00:00-08:00", "subscription_item": { "object": "SubscriptionItem", "vid": "d9f215896f53e9ee8461d5e32c6d14e840714128" }, "subscription": { "object": "Subscription", "id": "sub_12345", "vid": "beaff07323d3245936e2f062e5ceee7db778c891" }, "account": { "object": "Account", "id": "cust_2234", "vid": "c992135bc246474d66479fed89826aaaf6f7f572" }, "product": { "object": "Product", "id": "prod_1234", "vid": "ee6e14b60f5acd479aa0eb13077cbf31a854a3eb" }, "billed_status": "Billed" }'),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/events/{event}"
payload := strings.NewReader("\"{ \\\"object\\\": \\\"Event\\\", \\\"id\\\": \\\"event_223\\\", \\\"date_received\\\": \\\"2023-01-17T10:46:33-08:00\\\", \\\"event_date\\\": \\\"2023-01-18T00:00:00-08:00\\\", \\\"subscription_item\\\": { \\\"object\\\": \\\"SubscriptionItem\\\", \\\"vid\\\": \\\"d9f215896f53e9ee8461d5e32c6d14e840714128\\\" }, \\\"subscription\\\": { \\\"object\\\": \\\"Subscription\\\", \\\"id\\\": \\\"sub_12345\\\", \\\"vid\\\": \\\"beaff07323d3245936e2f062e5ceee7db778c891\\\" }, \\\"account\\\": { \\\"object\\\": \\\"Account\\\", \\\"id\\\": \\\"cust_2234\\\", \\\"vid\\\": \\\"c992135bc246474d66479fed89826aaaf6f7f572\\\" }, \\\"product\\\": { \\\"object\\\": \\\"Product\\\", \\\"id\\\": \\\"prod_1234\\\", \\\"vid\\\": \\\"ee6e14b60f5acd479aa0eb13077cbf31a854a3eb\\\" }, \\\"billed_status\\\": \\\"Billed\\\" }\"")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/events/{event}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("\"{ \\\"object\\\": \\\"Event\\\", \\\"id\\\": \\\"event_223\\\", \\\"date_received\\\": \\\"2023-01-17T10:46:33-08:00\\\", \\\"event_date\\\": \\\"2023-01-18T00:00:00-08:00\\\", \\\"subscription_item\\\": { \\\"object\\\": \\\"SubscriptionItem\\\", \\\"vid\\\": \\\"d9f215896f53e9ee8461d5e32c6d14e840714128\\\" }, \\\"subscription\\\": { \\\"object\\\": \\\"Subscription\\\", \\\"id\\\": \\\"sub_12345\\\", \\\"vid\\\": \\\"beaff07323d3245936e2f062e5ceee7db778c891\\\" }, \\\"account\\\": { \\\"object\\\": \\\"Account\\\", \\\"id\\\": \\\"cust_2234\\\", \\\"vid\\\": \\\"c992135bc246474d66479fed89826aaaf6f7f572\\\" }, \\\"product\\\": { \\\"object\\\": \\\"Product\\\", \\\"id\\\": \\\"prod_1234\\\", \\\"vid\\\": \\\"ee6e14b60f5acd479aa0eb13077cbf31a854a3eb\\\" }, \\\"billed_status\\\": \\\"Billed\\\" }\"")
.asString();require 'uri'
require 'net/http'
url = URI("https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/events/{event}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "\"{ \\\"object\\\": \\\"Event\\\", \\\"id\\\": \\\"event_223\\\", \\\"date_received\\\": \\\"2023-01-17T10:46:33-08:00\\\", \\\"event_date\\\": \\\"2023-01-18T00:00:00-08:00\\\", \\\"subscription_item\\\": { \\\"object\\\": \\\"SubscriptionItem\\\", \\\"vid\\\": \\\"d9f215896f53e9ee8461d5e32c6d14e840714128\\\" }, \\\"subscription\\\": { \\\"object\\\": \\\"Subscription\\\", \\\"id\\\": \\\"sub_12345\\\", \\\"vid\\\": \\\"beaff07323d3245936e2f062e5ceee7db778c891\\\" }, \\\"account\\\": { \\\"object\\\": \\\"Account\\\", \\\"id\\\": \\\"cust_2234\\\", \\\"vid\\\": \\\"c992135bc246474d66479fed89826aaaf6f7f572\\\" }, \\\"product\\\": { \\\"object\\\": \\\"Product\\\", \\\"id\\\": \\\"prod_1234\\\", \\\"vid\\\": \\\"ee6e14b60f5acd479aa0eb13077cbf31a854a3eb\\\" }, \\\"billed_status\\\": \\\"Billed\\\" }\""
response = http.request(request)
puts response.read_body"{ \"object\": \"Event\", \"id\": \"event_223\", \"vid\": \"5c2c034920a07825507017af8b7afcd96d18822a\", \"date_received\": \"2023-01-17T07:59:19+00:00\", \"event_date\": \"2023-01-18T00:00:00+00:00\", \"subscription_item\": { \"object\": \"SubscriptionItem\", \"id\": \"sub_12345.1\", \"vid\": \"d9f215896f53e9ee8461d5e32c6d14e840714128\" }, \"account\": { \"object\": \"Account\", \"id\": \"cust_2234\", \"vid\": \"c992135bc246474d66479fed89826aaaf6f7f572\" }, \"subscription\": { \"object\": \"Subscription\", \"id\": \"sub_12345\", \"vid\": \"53097bba3d9aa438efddcaaf3f7bddec97712636\" }, \"product\": { \"object\": \"Product\", \"id\": \"prod_1234\", \"vid\": \"ee6e14b60f5acd479aa0eb13077cbf31a854a3eb\" }, \"billed_status\": \"Billed\" }""{ \"object\": \"Error\", \"message\": \"JSON is invalid\" }"{
"code": "<string>",
"message": "<string>"
}"{ \"object\": \"Error\", \"message\": \"This endpoint does not exist. Check our API docs.\" }"Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
The id or the vid of the Event to update A unique identifier. Optionally, this object can also be identified by its vid. Using a unique custom identifier is strongly encouraged.
128Body
JSON A full event object.
Value is “Event”
A merchant-specified unique identifier. Optionally, this object can be identified by its vid.
128A Globally Unique Identifier (GUID) for this object. Assigned by CashBox.
128The date/time at which the event was recorded into CashBox.
The date/time at which the event was recorded into CashBox.
A Merchant-specified description of the event.
The subscription item under which the event is to be recorded and billed.
Show child attributes
Show child attributes
The account associated with the recorded event.
Show child attributes
Show child attributes
The subscription associated with the recorded event.
Show child attributes
Show child attributes
The product under which the event is to be recorded and billed.
Show child attributes
Show child attributes
The amount of usage units to be billed.
Value can be Billed,Unbilled
Billed, Unbilled A set of key/value pairs that you can attach to an object. Useful for storing additional information.
Response
JSON A full Event object.
Value is “Event”
A merchant-specified unique identifier. Optionally, this object can be identified by its vid.
128A Globally Unique Identifier (GUID) for this object. Assigned by CashBox.
128The date/time at which the event was recorded into CashBox.
The date/time at which the event was recorded into CashBox.
A Merchant-specified description of the event.
The subscription item under which the event is to be recorded and billed.
Show child attributes
Show child attributes
The account associated with the recorded event.
Show child attributes
Show child attributes
The subscription associated with the recorded event.
Show child attributes
Show child attributes
The product under which the event is to be recorded and billed.
Show child attributes
Show child attributes
The amount of usage units to be billed.
Value can be Billed,Unbilled
Billed, Unbilled A set of key/value pairs that you can attach to an object. Useful for storing additional information.

