Skip to main content
GET
/
rr
/
api
/
v1
/
contracts
/
{contract_id}
/
usage
/
{id}
Retrieve Contract Usage Revenue
curl --request GET \
  --url https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/usage/{id} \
  --header 'Authorization: <api-key>'
import requests

url = "https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/usage/{id}"

headers = {"Authorization": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: '<api-key>'}};

fetch('https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/usage/{id}', 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/contracts/{contract_id}/usage/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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"
"net/http"
"io"
)

func main() {

url := "https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/usage/{id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/usage/{id}")
.header("Authorization", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.meetcampfire.com/rr/api/v1/contracts/{contract_id}/usage/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "id": 123,
  "contract": 123,
  "product_bundle": "<string>",
  "contract_product_bundle": {
    "id": 123,
    "source_bundle_name": "<string>",
    "total_amount": 0,
    "lines": [
      {
        "id": 123,
        "product": 123,
        "product_name": "<string>",
        "amount": 0,
        "percentage": "<string>",
        "original_percentage": 0
      }
    ],
    "source_bundle": 123,
    "currency": "<string>"
  },
  "product_name": "<string>",
  "product_bundle_name": "<string>",
  "usage_group_name": "<string>",
  "lines": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "last_modified_at": "2023-11-07T05:31:56Z",
  "product": 123,
  "usage_group": 123,
  "department": 123,
  "tags": "<string>",
  "description": "<string>",
  "start_date": "2023-12-25",
  "end_date": "2023-12-25"
}

Authorizations

Authorization
string
header
required

Token-based authentication with required prefix "Token"

Path Parameters

contract_id
integer
required
id
integer
required

Response

200 - application/json
id
integer
required
read-only
contract
integer
required
product_bundle
string
required
read-only
contract_product_bundle
object
required

Read-only serializer for ContractProductBundle in milestone responses.

product_name
string
required
read-only
product_bundle_name
string
required
read-only
usage_group_name
string
required
read-only
lines
string
required
read-only
created_at
string<date-time> | null
required
read-only
last_modified_at
string<date-time> | null
required
read-only
product
integer | null
usage_group
integer | null
department
integer | null
tags
string
description
string | null
start_date
string<date> | null
end_date
string<date> | null