Ingest invoices into the system
curl --request POST \
--url https://api.slickerhq.com/ingest/v1/invoices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoices": [
{
"id": "inv_12345678",
"state": "INVOICE_STATE_PAID",
"customerId": "cus_87654321",
"subscriptionId": "sub_12345678",
"businessEntity": "ACME Inc.",
"amount": 2500,
"currency": "USD",
"createdAt": "2023-01-15T10:00:00Z",
"updatedAt": "2023-01-15T10:30:00Z"
},
{
"id": "inv_87654321",
"state": "INVOICE_STATE_UNPAID",
"customerId": "cus_12345678",
"subscriptionId": "sub_87654321",
"businessEntity": "ACME Inc.",
"amount": 5000,
"currency": "USD",
"createdAt": "2023-01-20T09:00:00Z",
"updatedAt": "2023-01-20T09:30:00Z"
}
]
}
'import requests
url = "https://api.slickerhq.com/ingest/v1/invoices"
payload = { "invoices": [
{
"id": "inv_12345678",
"state": "INVOICE_STATE_PAID",
"customerId": "cus_87654321",
"subscriptionId": "sub_12345678",
"businessEntity": "ACME Inc.",
"amount": 2500,
"currency": "USD",
"createdAt": "2023-01-15T10:00:00Z",
"updatedAt": "2023-01-15T10:30:00Z"
},
{
"id": "inv_87654321",
"state": "INVOICE_STATE_UNPAID",
"customerId": "cus_12345678",
"subscriptionId": "sub_87654321",
"businessEntity": "ACME Inc.",
"amount": 5000,
"currency": "USD",
"createdAt": "2023-01-20T09:00:00Z",
"updatedAt": "2023-01-20T09:30:00Z"
}
] }
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({
invoices: [
{
id: 'inv_12345678',
state: 'INVOICE_STATE_PAID',
customerId: 'cus_87654321',
subscriptionId: 'sub_12345678',
businessEntity: 'ACME Inc.',
amount: 2500,
currency: 'USD',
createdAt: '2023-01-15T10:00:00Z',
updatedAt: '2023-01-15T10:30:00Z'
},
{
id: 'inv_87654321',
state: 'INVOICE_STATE_UNPAID',
customerId: 'cus_12345678',
subscriptionId: 'sub_87654321',
businessEntity: 'ACME Inc.',
amount: 5000,
currency: 'USD',
createdAt: '2023-01-20T09:00:00Z',
updatedAt: '2023-01-20T09:30:00Z'
}
]
})
};
fetch('https://api.slickerhq.com/ingest/v1/invoices', 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.slickerhq.com/ingest/v1/invoices",
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' => [
[
'id' => 'inv_12345678',
'state' => 'INVOICE_STATE_PAID',
'customerId' => 'cus_87654321',
'subscriptionId' => 'sub_12345678',
'businessEntity' => 'ACME Inc.',
'amount' => 2500,
'currency' => 'USD',
'createdAt' => '2023-01-15T10:00:00Z',
'updatedAt' => '2023-01-15T10:30:00Z'
],
[
'id' => 'inv_87654321',
'state' => 'INVOICE_STATE_UNPAID',
'customerId' => 'cus_12345678',
'subscriptionId' => 'sub_87654321',
'businessEntity' => 'ACME Inc.',
'amount' => 5000,
'currency' => 'USD',
'createdAt' => '2023-01-20T09:00:00Z',
'updatedAt' => '2023-01-20T09:30:00Z'
]
]
]),
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.slickerhq.com/ingest/v1/invoices"
payload := strings.NewReader("{\n \"invoices\": [\n {\n \"id\": \"inv_12345678\",\n \"state\": \"INVOICE_STATE_PAID\",\n \"customerId\": \"cus_87654321\",\n \"subscriptionId\": \"sub_12345678\",\n \"businessEntity\": \"ACME Inc.\",\n \"amount\": 2500,\n \"currency\": \"USD\",\n \"createdAt\": \"2023-01-15T10:00:00Z\",\n \"updatedAt\": \"2023-01-15T10:30:00Z\"\n },\n {\n \"id\": \"inv_87654321\",\n \"state\": \"INVOICE_STATE_UNPAID\",\n \"customerId\": \"cus_12345678\",\n \"subscriptionId\": \"sub_87654321\",\n \"businessEntity\": \"ACME Inc.\",\n \"amount\": 5000,\n \"currency\": \"USD\",\n \"createdAt\": \"2023-01-20T09:00:00Z\",\n \"updatedAt\": \"2023-01-20T09:30:00Z\"\n }\n ]\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.slickerhq.com/ingest/v1/invoices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invoices\": [\n {\n \"id\": \"inv_12345678\",\n \"state\": \"INVOICE_STATE_PAID\",\n \"customerId\": \"cus_87654321\",\n \"subscriptionId\": \"sub_12345678\",\n \"businessEntity\": \"ACME Inc.\",\n \"amount\": 2500,\n \"currency\": \"USD\",\n \"createdAt\": \"2023-01-15T10:00:00Z\",\n \"updatedAt\": \"2023-01-15T10:30:00Z\"\n },\n {\n \"id\": \"inv_87654321\",\n \"state\": \"INVOICE_STATE_UNPAID\",\n \"customerId\": \"cus_12345678\",\n \"subscriptionId\": \"sub_87654321\",\n \"businessEntity\": \"ACME Inc.\",\n \"amount\": 5000,\n \"currency\": \"USD\",\n \"createdAt\": \"2023-01-20T09:00:00Z\",\n \"updatedAt\": \"2023-01-20T09:30:00Z\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slickerhq.com/ingest/v1/invoices")
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 \"invoices\": [\n {\n \"id\": \"inv_12345678\",\n \"state\": \"INVOICE_STATE_PAID\",\n \"customerId\": \"cus_87654321\",\n \"subscriptionId\": \"sub_12345678\",\n \"businessEntity\": \"ACME Inc.\",\n \"amount\": 2500,\n \"currency\": \"USD\",\n \"createdAt\": \"2023-01-15T10:00:00Z\",\n \"updatedAt\": \"2023-01-15T10:30:00Z\"\n },\n {\n \"id\": \"inv_87654321\",\n \"state\": \"INVOICE_STATE_UNPAID\",\n \"customerId\": \"cus_12345678\",\n \"subscriptionId\": \"sub_87654321\",\n \"businessEntity\": \"ACME Inc.\",\n \"amount\": 5000,\n \"currency\": \"USD\",\n \"createdAt\": \"2023-01-20T09:00:00Z\",\n \"updatedAt\": \"2023-01-20T09:30:00Z\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"requestId": "req_2uqkAo1bwllmzrgV2qtGv48DtGI"
}{
"code": 400,
"message": "Invalid invoice data: missing required fields",
"details": []
}{
"code": 401,
"message": "Unauthorized: missing or invalid API key in Bearer token",
"details": []
}{
"code": 403,
"message": "Forbidden: insufficient permissions to ingest invoices",
"details": []
}{
"code": 429,
"message": "Rate limit exceeded: try again later",
"details": []
}{
"code": 500,
"message": "Internal server error",
"details": []
}{
"requestId": "req_2uqkAo1bwllmzrgV2qtGv48DtGI"
}Slicker Endpoints
Add invoices
POST
/
v1
/
invoices
Ingest invoices into the system
curl --request POST \
--url https://api.slickerhq.com/ingest/v1/invoices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoices": [
{
"id": "inv_12345678",
"state": "INVOICE_STATE_PAID",
"customerId": "cus_87654321",
"subscriptionId": "sub_12345678",
"businessEntity": "ACME Inc.",
"amount": 2500,
"currency": "USD",
"createdAt": "2023-01-15T10:00:00Z",
"updatedAt": "2023-01-15T10:30:00Z"
},
{
"id": "inv_87654321",
"state": "INVOICE_STATE_UNPAID",
"customerId": "cus_12345678",
"subscriptionId": "sub_87654321",
"businessEntity": "ACME Inc.",
"amount": 5000,
"currency": "USD",
"createdAt": "2023-01-20T09:00:00Z",
"updatedAt": "2023-01-20T09:30:00Z"
}
]
}
'import requests
url = "https://api.slickerhq.com/ingest/v1/invoices"
payload = { "invoices": [
{
"id": "inv_12345678",
"state": "INVOICE_STATE_PAID",
"customerId": "cus_87654321",
"subscriptionId": "sub_12345678",
"businessEntity": "ACME Inc.",
"amount": 2500,
"currency": "USD",
"createdAt": "2023-01-15T10:00:00Z",
"updatedAt": "2023-01-15T10:30:00Z"
},
{
"id": "inv_87654321",
"state": "INVOICE_STATE_UNPAID",
"customerId": "cus_12345678",
"subscriptionId": "sub_87654321",
"businessEntity": "ACME Inc.",
"amount": 5000,
"currency": "USD",
"createdAt": "2023-01-20T09:00:00Z",
"updatedAt": "2023-01-20T09:30:00Z"
}
] }
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({
invoices: [
{
id: 'inv_12345678',
state: 'INVOICE_STATE_PAID',
customerId: 'cus_87654321',
subscriptionId: 'sub_12345678',
businessEntity: 'ACME Inc.',
amount: 2500,
currency: 'USD',
createdAt: '2023-01-15T10:00:00Z',
updatedAt: '2023-01-15T10:30:00Z'
},
{
id: 'inv_87654321',
state: 'INVOICE_STATE_UNPAID',
customerId: 'cus_12345678',
subscriptionId: 'sub_87654321',
businessEntity: 'ACME Inc.',
amount: 5000,
currency: 'USD',
createdAt: '2023-01-20T09:00:00Z',
updatedAt: '2023-01-20T09:30:00Z'
}
]
})
};
fetch('https://api.slickerhq.com/ingest/v1/invoices', 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.slickerhq.com/ingest/v1/invoices",
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' => [
[
'id' => 'inv_12345678',
'state' => 'INVOICE_STATE_PAID',
'customerId' => 'cus_87654321',
'subscriptionId' => 'sub_12345678',
'businessEntity' => 'ACME Inc.',
'amount' => 2500,
'currency' => 'USD',
'createdAt' => '2023-01-15T10:00:00Z',
'updatedAt' => '2023-01-15T10:30:00Z'
],
[
'id' => 'inv_87654321',
'state' => 'INVOICE_STATE_UNPAID',
'customerId' => 'cus_12345678',
'subscriptionId' => 'sub_87654321',
'businessEntity' => 'ACME Inc.',
'amount' => 5000,
'currency' => 'USD',
'createdAt' => '2023-01-20T09:00:00Z',
'updatedAt' => '2023-01-20T09:30:00Z'
]
]
]),
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.slickerhq.com/ingest/v1/invoices"
payload := strings.NewReader("{\n \"invoices\": [\n {\n \"id\": \"inv_12345678\",\n \"state\": \"INVOICE_STATE_PAID\",\n \"customerId\": \"cus_87654321\",\n \"subscriptionId\": \"sub_12345678\",\n \"businessEntity\": \"ACME Inc.\",\n \"amount\": 2500,\n \"currency\": \"USD\",\n \"createdAt\": \"2023-01-15T10:00:00Z\",\n \"updatedAt\": \"2023-01-15T10:30:00Z\"\n },\n {\n \"id\": \"inv_87654321\",\n \"state\": \"INVOICE_STATE_UNPAID\",\n \"customerId\": \"cus_12345678\",\n \"subscriptionId\": \"sub_87654321\",\n \"businessEntity\": \"ACME Inc.\",\n \"amount\": 5000,\n \"currency\": \"USD\",\n \"createdAt\": \"2023-01-20T09:00:00Z\",\n \"updatedAt\": \"2023-01-20T09:30:00Z\"\n }\n ]\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.slickerhq.com/ingest/v1/invoices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invoices\": [\n {\n \"id\": \"inv_12345678\",\n \"state\": \"INVOICE_STATE_PAID\",\n \"customerId\": \"cus_87654321\",\n \"subscriptionId\": \"sub_12345678\",\n \"businessEntity\": \"ACME Inc.\",\n \"amount\": 2500,\n \"currency\": \"USD\",\n \"createdAt\": \"2023-01-15T10:00:00Z\",\n \"updatedAt\": \"2023-01-15T10:30:00Z\"\n },\n {\n \"id\": \"inv_87654321\",\n \"state\": \"INVOICE_STATE_UNPAID\",\n \"customerId\": \"cus_12345678\",\n \"subscriptionId\": \"sub_87654321\",\n \"businessEntity\": \"ACME Inc.\",\n \"amount\": 5000,\n \"currency\": \"USD\",\n \"createdAt\": \"2023-01-20T09:00:00Z\",\n \"updatedAt\": \"2023-01-20T09:30:00Z\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slickerhq.com/ingest/v1/invoices")
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 \"invoices\": [\n {\n \"id\": \"inv_12345678\",\n \"state\": \"INVOICE_STATE_PAID\",\n \"customerId\": \"cus_87654321\",\n \"subscriptionId\": \"sub_12345678\",\n \"businessEntity\": \"ACME Inc.\",\n \"amount\": 2500,\n \"currency\": \"USD\",\n \"createdAt\": \"2023-01-15T10:00:00Z\",\n \"updatedAt\": \"2023-01-15T10:30:00Z\"\n },\n {\n \"id\": \"inv_87654321\",\n \"state\": \"INVOICE_STATE_UNPAID\",\n \"customerId\": \"cus_12345678\",\n \"subscriptionId\": \"sub_87654321\",\n \"businessEntity\": \"ACME Inc.\",\n \"amount\": 5000,\n \"currency\": \"USD\",\n \"createdAt\": \"2023-01-20T09:00:00Z\",\n \"updatedAt\": \"2023-01-20T09:30:00Z\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"requestId": "req_2uqkAo1bwllmzrgV2qtGv48DtGI"
}{
"code": 400,
"message": "Invalid invoice data: missing required fields",
"details": []
}{
"code": 401,
"message": "Unauthorized: missing or invalid API key in Bearer token",
"details": []
}{
"code": 403,
"message": "Forbidden: insufficient permissions to ingest invoices",
"details": []
}{
"code": 429,
"message": "Rate limit exceeded: try again later",
"details": []
}{
"code": 500,
"message": "Internal server error",
"details": []
}{
"requestId": "req_2uqkAo1bwllmzrgV2qtGv48DtGI"
}Authorizations
API key authentication using a Bearer token in the Authorization header.
Example: Authorization: Bearer YOUR_API_KEY
Body
application/json
Request to ingest invoice data. Maximum of 200 invoices per request.
Show child attributes
Show child attributes
Response
A successful response.
Unique identifier for tracking the request through the system
Example:
"req_2uqkAo1bwllmzrgV2qtGv48DtGI"
⌘I