Fetch an invoice
curl --request GET \
--url https://api.cf.ovrsea.com/v1/invoices/{reference}import requests
url = "https://api.cf.ovrsea.com/v1/invoices/{reference}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.cf.ovrsea.com/v1/invoices/{reference}', 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.cf.ovrsea.com/v1/invoices/{reference}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.cf.ovrsea.com/v1/invoices/{reference}"
req, _ := http.NewRequest("GET", url, nil)
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.cf.ovrsea.com/v1/invoices/{reference}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cf.ovrsea.com/v1/invoices/{reference}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"reference": "CDEF - 0342/7055 2022",
"number": "FAC2022-9567",
"ovrsea_shipment_id": "CDEF",
"type": "invoice",
"status": "available",
"sent_date": "2021-09-20T10:02:09+01:00",
"due_date": "2021-10-11",
"lines": [
{
"category": "arrival_customs",
"description": "IMO Surcharge",
"price": {
"amount": 150357.99,
"currency": "USD"
},
"quantity": {
"value": 350.25,
"unit": "tc"
},
"unit_rate": {
"amount": 150357.99,
"currency": "USD"
},
"vatRate": 20
}
],
"usd_to_eur_rate": 0.82
}{}Invoices
Fetch an invoice
This endpoint returns the invoice corresponding to the given number.
Fetch an invoice
curl --request GET \
--url https://api.cf.ovrsea.com/v1/invoices/{reference}import requests
url = "https://api.cf.ovrsea.com/v1/invoices/{reference}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.cf.ovrsea.com/v1/invoices/{reference}', 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.cf.ovrsea.com/v1/invoices/{reference}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.cf.ovrsea.com/v1/invoices/{reference}"
req, _ := http.NewRequest("GET", url, nil)
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.cf.ovrsea.com/v1/invoices/{reference}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cf.ovrsea.com/v1/invoices/{reference}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"reference": "CDEF - 0342/7055 2022",
"number": "FAC2022-9567",
"ovrsea_shipment_id": "CDEF",
"type": "invoice",
"status": "available",
"sent_date": "2021-09-20T10:02:09+01:00",
"due_date": "2021-10-11",
"lines": [
{
"category": "arrival_customs",
"description": "IMO Surcharge",
"price": {
"amount": 150357.99,
"currency": "USD"
},
"quantity": {
"value": 350.25,
"unit": "tc"
},
"unit_rate": {
"amount": 150357.99,
"currency": "USD"
},
"vatRate": 20
}
],
"usd_to_eur_rate": 0.82
}{}Path Parameters
Response
Fetch an invoice given its reference
Example:
"CDEF - 0342/7055 2022"
Example:
"FAC2022-9567"
Example:
"CDEF"
Available options:
invoice, credit_note Available options:
available, due, in_modification, litigious, new, paid, partially_paid, write_off Example:
"2021-09-20T10:02:09+01:00"
Example:
"2021-10-11"
Show child attributes
Show child attributes
Example:
0.82
⌘I
