Preview Invoice Upload Revenue Links
curl --request POST \
--url https://api.meetcampfire.com/coa/api/v1/invoice/csv-revenue-preview \
--header 'Content-Type: application/json' \
--data '
{
"invoices": [
{
"reference": "<string>",
"lines": [
{
"amount": 0,
"product": 123,
"discount": 0,
"service_date": "2023-12-25"
}
],
"invoice_number": "<string>",
"invoice_date": "2023-12-25",
"period_start": "2023-12-25",
"period_end": "2023-12-25",
"currency": "<string>",
"entity": 123,
"client": 123,
"contract": 123
}
]
}
'import requests
url = "https://api.meetcampfire.com/coa/api/v1/invoice/csv-revenue-preview"
payload = { "invoices": [
{
"reference": "<string>",
"lines": [
{
"amount": 0,
"product": 123,
"discount": 0,
"service_date": "2023-12-25"
}
],
"invoice_number": "<string>",
"invoice_date": "2023-12-25",
"period_start": "2023-12-25",
"period_end": "2023-12-25",
"currency": "<string>",
"entity": 123,
"client": 123,
"contract": 123
}
] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
invoices: [
{
reference: '<string>',
lines: [{amount: 0, product: 123, discount: 0, service_date: '2023-12-25'}],
invoice_number: '<string>',
invoice_date: '2023-12-25',
period_start: '2023-12-25',
period_end: '2023-12-25',
currency: '<string>',
entity: 123,
client: 123,
contract: 123
}
]
})
};
fetch('https://api.meetcampfire.com/coa/api/v1/invoice/csv-revenue-preview', 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/coa/api/v1/invoice/csv-revenue-preview",
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([
'invoices' => [
[
'reference' => '<string>',
'lines' => [
[
'amount' => 0,
'product' => 123,
'discount' => 0,
'service_date' => '2023-12-25'
]
],
'invoice_number' => '<string>',
'invoice_date' => '2023-12-25',
'period_start' => '2023-12-25',
'period_end' => '2023-12-25',
'currency' => '<string>',
'entity' => 123,
'client' => 123,
'contract' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"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/coa/api/v1/invoice/csv-revenue-preview"
payload := strings.NewReader("{\n \"invoices\": [\n {\n \"reference\": \"<string>\",\n \"lines\": [\n {\n \"amount\": 0,\n \"product\": 123,\n \"discount\": 0,\n \"service_date\": \"2023-12-25\"\n }\n ],\n \"invoice_number\": \"<string>\",\n \"invoice_date\": \"2023-12-25\",\n \"period_start\": \"2023-12-25\",\n \"period_end\": \"2023-12-25\",\n \"currency\": \"<string>\",\n \"entity\": 123,\n \"client\": 123,\n \"contract\": 123\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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/coa/api/v1/invoice/csv-revenue-preview")
.header("Content-Type", "application/json")
.body("{\n \"invoices\": [\n {\n \"reference\": \"<string>\",\n \"lines\": [\n {\n \"amount\": 0,\n \"product\": 123,\n \"discount\": 0,\n \"service_date\": \"2023-12-25\"\n }\n ],\n \"invoice_number\": \"<string>\",\n \"invoice_date\": \"2023-12-25\",\n \"period_start\": \"2023-12-25\",\n \"period_end\": \"2023-12-25\",\n \"currency\": \"<string>\",\n \"entity\": 123,\n \"client\": 123,\n \"contract\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/coa/api/v1/invoice/csv-revenue-preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"invoices\": [\n {\n \"reference\": \"<string>\",\n \"lines\": [\n {\n \"amount\": 0,\n \"product\": 123,\n \"discount\": 0,\n \"service_date\": \"2023-12-25\"\n }\n ],\n \"invoice_number\": \"<string>\",\n \"invoice_date\": \"2023-12-25\",\n \"period_start\": \"2023-12-25\",\n \"period_end\": \"2023-12-25\",\n \"currency\": \"<string>\",\n \"entity\": 123,\n \"client\": 123,\n \"contract\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"invoices": [
{
"reference": "<string>",
"invoice_number": "<string>",
"contract_id": 123,
"status": "<string>",
"reason": "<string>",
"review_flags": [
"<string>"
],
"allocations": [
{
"revenue_line_id": 123,
"amount_before": 0,
"allocated_amount": 0,
"split": true,
"outside_period": true
}
]
}
],
"contracts": [
{
"id": 123,
"deal_name": "<string>",
"deal_id": "<string>",
"currency": "<string>",
"revenue_lines": [
{
"id": 123,
"transaction_date": "2023-12-25",
"transaction_end_date": "2023-12-25",
"product_name": "<string>",
"amount": 0,
"invoice_id": 123,
"invoice_number": "<string>"
}
]
}
]
}Accounts Receivable
Preview Invoice Upload Revenue Links
Dry run of the invoice upload’s revenue linking, in the order given (the order the upload posts them). Nothing is saved.
POST
/
coa
/
api
/
v1
/
invoice
/
csv-revenue-preview
Preview Invoice Upload Revenue Links
curl --request POST \
--url https://api.meetcampfire.com/coa/api/v1/invoice/csv-revenue-preview \
--header 'Content-Type: application/json' \
--data '
{
"invoices": [
{
"reference": "<string>",
"lines": [
{
"amount": 0,
"product": 123,
"discount": 0,
"service_date": "2023-12-25"
}
],
"invoice_number": "<string>",
"invoice_date": "2023-12-25",
"period_start": "2023-12-25",
"period_end": "2023-12-25",
"currency": "<string>",
"entity": 123,
"client": 123,
"contract": 123
}
]
}
'import requests
url = "https://api.meetcampfire.com/coa/api/v1/invoice/csv-revenue-preview"
payload = { "invoices": [
{
"reference": "<string>",
"lines": [
{
"amount": 0,
"product": 123,
"discount": 0,
"service_date": "2023-12-25"
}
],
"invoice_number": "<string>",
"invoice_date": "2023-12-25",
"period_start": "2023-12-25",
"period_end": "2023-12-25",
"currency": "<string>",
"entity": 123,
"client": 123,
"contract": 123
}
] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
invoices: [
{
reference: '<string>',
lines: [{amount: 0, product: 123, discount: 0, service_date: '2023-12-25'}],
invoice_number: '<string>',
invoice_date: '2023-12-25',
period_start: '2023-12-25',
period_end: '2023-12-25',
currency: '<string>',
entity: 123,
client: 123,
contract: 123
}
]
})
};
fetch('https://api.meetcampfire.com/coa/api/v1/invoice/csv-revenue-preview', 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/coa/api/v1/invoice/csv-revenue-preview",
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([
'invoices' => [
[
'reference' => '<string>',
'lines' => [
[
'amount' => 0,
'product' => 123,
'discount' => 0,
'service_date' => '2023-12-25'
]
],
'invoice_number' => '<string>',
'invoice_date' => '2023-12-25',
'period_start' => '2023-12-25',
'period_end' => '2023-12-25',
'currency' => '<string>',
'entity' => 123,
'client' => 123,
'contract' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"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/coa/api/v1/invoice/csv-revenue-preview"
payload := strings.NewReader("{\n \"invoices\": [\n {\n \"reference\": \"<string>\",\n \"lines\": [\n {\n \"amount\": 0,\n \"product\": 123,\n \"discount\": 0,\n \"service_date\": \"2023-12-25\"\n }\n ],\n \"invoice_number\": \"<string>\",\n \"invoice_date\": \"2023-12-25\",\n \"period_start\": \"2023-12-25\",\n \"period_end\": \"2023-12-25\",\n \"currency\": \"<string>\",\n \"entity\": 123,\n \"client\": 123,\n \"contract\": 123\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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/coa/api/v1/invoice/csv-revenue-preview")
.header("Content-Type", "application/json")
.body("{\n \"invoices\": [\n {\n \"reference\": \"<string>\",\n \"lines\": [\n {\n \"amount\": 0,\n \"product\": 123,\n \"discount\": 0,\n \"service_date\": \"2023-12-25\"\n }\n ],\n \"invoice_number\": \"<string>\",\n \"invoice_date\": \"2023-12-25\",\n \"period_start\": \"2023-12-25\",\n \"period_end\": \"2023-12-25\",\n \"currency\": \"<string>\",\n \"entity\": 123,\n \"client\": 123,\n \"contract\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/coa/api/v1/invoice/csv-revenue-preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"invoices\": [\n {\n \"reference\": \"<string>\",\n \"lines\": [\n {\n \"amount\": 0,\n \"product\": 123,\n \"discount\": 0,\n \"service_date\": \"2023-12-25\"\n }\n ],\n \"invoice_number\": \"<string>\",\n \"invoice_date\": \"2023-12-25\",\n \"period_start\": \"2023-12-25\",\n \"period_end\": \"2023-12-25\",\n \"currency\": \"<string>\",\n \"entity\": 123,\n \"client\": 123,\n \"contract\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"invoices": [
{
"reference": "<string>",
"invoice_number": "<string>",
"contract_id": 123,
"status": "<string>",
"reason": "<string>",
"review_flags": [
"<string>"
],
"allocations": [
{
"revenue_line_id": 123,
"amount_before": 0,
"allocated_amount": 0,
"split": true,
"outside_period": true
}
]
}
],
"contracts": [
{
"id": 123,
"deal_name": "<string>",
"deal_id": "<string>",
"currency": "<string>",
"revenue_lines": [
{
"id": 123,
"transaction_date": "2023-12-25",
"transaction_end_date": "2023-12-25",
"product_name": "<string>",
"amount": 0,
"invoice_id": 123,
"invoice_number": "<string>"
}
]
}
]
}