curl --request POST \
--url https://api.dots.dev/api/v2/accounts-payable/payables \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"acting_user_id": 123,
"number": "<string>",
"description": "<string>",
"external_id": "<string>",
"ap_vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ap_payment_method_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 2,
"file": "aSDinaTvuI8gbWludGxpZnk=",
"items": [
{
"name": "<string>",
"unit_price": 2,
"quantity": 2,
"amount": 2,
"description": "<string>"
}
]
}
'import requests
url = "https://api.dots.dev/api/v2/accounts-payable/payables"
payload = {
"acting_user_id": 123,
"number": "<string>",
"description": "<string>",
"external_id": "<string>",
"ap_vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ap_payment_method_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 2,
"file": "aSDinaTvuI8gbWludGxpZnk=",
"items": [
{
"name": "<string>",
"unit_price": 2,
"quantity": 2,
"amount": 2,
"description": "<string>"
}
]
}
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({
acting_user_id: 123,
number: '<string>',
description: '<string>',
external_id: '<string>',
ap_vendor_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
ap_payment_method_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 2,
file: 'aSDinaTvuI8gbWludGxpZnk=',
items: [
{
name: '<string>',
unit_price: 2,
quantity: 2,
amount: 2,
description: '<string>'
}
]
})
};
fetch('https://api.dots.dev/api/v2/accounts-payable/payables', 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.dots.dev/api/v2/accounts-payable/payables",
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([
'acting_user_id' => 123,
'number' => '<string>',
'description' => '<string>',
'external_id' => '<string>',
'ap_vendor_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'ap_payment_method_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 2,
'file' => 'aSDinaTvuI8gbWludGxpZnk=',
'items' => [
[
'name' => '<string>',
'unit_price' => 2,
'quantity' => 2,
'amount' => 2,
'description' => '<string>'
]
]
]),
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://api.dots.dev/api/v2/accounts-payable/payables"
payload := strings.NewReader("{\n \"acting_user_id\": 123,\n \"number\": \"<string>\",\n \"description\": \"<string>\",\n \"external_id\": \"<string>\",\n \"ap_vendor_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ap_payment_method_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 2,\n \"file\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"items\": [\n {\n \"name\": \"<string>\",\n \"unit_price\": 2,\n \"quantity\": 2,\n \"amount\": 2,\n \"description\": \"<string>\"\n }\n ]\n}")
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://api.dots.dev/api/v2/accounts-payable/payables")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"acting_user_id\": 123,\n \"number\": \"<string>\",\n \"description\": \"<string>\",\n \"external_id\": \"<string>\",\n \"ap_vendor_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ap_payment_method_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 2,\n \"file\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"items\": [\n {\n \"name\": \"<string>\",\n \"unit_price\": 2,\n \"quantity\": 2,\n \"amount\": 2,\n \"description\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dots.dev/api/v2/accounts-payable/payables")
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 = "{\n \"acting_user_id\": 123,\n \"number\": \"<string>\",\n \"description\": \"<string>\",\n \"external_id\": \"<string>\",\n \"ap_vendor_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ap_payment_method_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 2,\n \"file\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"items\": [\n {\n \"name\": \"<string>\",\n \"unit_price\": 2,\n \"quantity\": 2,\n \"amount\": 2,\n \"description\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"action_history": [
{
"comment": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"user_id": 123,
"user_name": "<string>"
}
],
"amount": 123,
"ap_payment_method_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ap_payment_method_name": "<string>",
"ap_vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ap_vendor_name": "<string>",
"api_app_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approval_steps": [
{
"completed": true,
"completed_timestamp": "2023-11-07T05:31:56Z",
"num_approvals_required": 123,
"user_approvals": [
{
"approval_comment": "<string>",
"approval_given": true,
"approval_timestamp": "2023-11-07T05:31:56Z",
"name": "<string>",
"user_id": 123
}
]
}
],
"created": "2023-11-07T05:31:56Z",
"currency": "<string>",
"description": "<string>",
"external_id": "<string>",
"file_url": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"amount": 2,
"description": "<string>",
"name": "<string>",
"quantity": 2,
"unit_price": 2
}
],
"number": "<string>",
"status": "<string>",
"status_history": [
{
"timestamp": "2023-11-07T05:31:56Z"
}
],
"transfer_history": [
{
"created_timestamp": "2023-11-07T05:31:56Z",
"idempotency_key": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transfer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"transfer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated": "2023-11-07T05:31:56Z"
}Create a payable
Create a payable in your app for accounts payable. The minimum required details to create a payable is the payable number. Remaining fields can be added later by updating the payable before submission.
curl --request POST \
--url https://api.dots.dev/api/v2/accounts-payable/payables \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"acting_user_id": 123,
"number": "<string>",
"description": "<string>",
"external_id": "<string>",
"ap_vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ap_payment_method_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 2,
"file": "aSDinaTvuI8gbWludGxpZnk=",
"items": [
{
"name": "<string>",
"unit_price": 2,
"quantity": 2,
"amount": 2,
"description": "<string>"
}
]
}
'import requests
url = "https://api.dots.dev/api/v2/accounts-payable/payables"
payload = {
"acting_user_id": 123,
"number": "<string>",
"description": "<string>",
"external_id": "<string>",
"ap_vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ap_payment_method_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 2,
"file": "aSDinaTvuI8gbWludGxpZnk=",
"items": [
{
"name": "<string>",
"unit_price": 2,
"quantity": 2,
"amount": 2,
"description": "<string>"
}
]
}
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({
acting_user_id: 123,
number: '<string>',
description: '<string>',
external_id: '<string>',
ap_vendor_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
ap_payment_method_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 2,
file: 'aSDinaTvuI8gbWludGxpZnk=',
items: [
{
name: '<string>',
unit_price: 2,
quantity: 2,
amount: 2,
description: '<string>'
}
]
})
};
fetch('https://api.dots.dev/api/v2/accounts-payable/payables', 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.dots.dev/api/v2/accounts-payable/payables",
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([
'acting_user_id' => 123,
'number' => '<string>',
'description' => '<string>',
'external_id' => '<string>',
'ap_vendor_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'ap_payment_method_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 2,
'file' => 'aSDinaTvuI8gbWludGxpZnk=',
'items' => [
[
'name' => '<string>',
'unit_price' => 2,
'quantity' => 2,
'amount' => 2,
'description' => '<string>'
]
]
]),
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://api.dots.dev/api/v2/accounts-payable/payables"
payload := strings.NewReader("{\n \"acting_user_id\": 123,\n \"number\": \"<string>\",\n \"description\": \"<string>\",\n \"external_id\": \"<string>\",\n \"ap_vendor_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ap_payment_method_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 2,\n \"file\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"items\": [\n {\n \"name\": \"<string>\",\n \"unit_price\": 2,\n \"quantity\": 2,\n \"amount\": 2,\n \"description\": \"<string>\"\n }\n ]\n}")
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://api.dots.dev/api/v2/accounts-payable/payables")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"acting_user_id\": 123,\n \"number\": \"<string>\",\n \"description\": \"<string>\",\n \"external_id\": \"<string>\",\n \"ap_vendor_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ap_payment_method_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 2,\n \"file\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"items\": [\n {\n \"name\": \"<string>\",\n \"unit_price\": 2,\n \"quantity\": 2,\n \"amount\": 2,\n \"description\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dots.dev/api/v2/accounts-payable/payables")
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 = "{\n \"acting_user_id\": 123,\n \"number\": \"<string>\",\n \"description\": \"<string>\",\n \"external_id\": \"<string>\",\n \"ap_vendor_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ap_payment_method_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 2,\n \"file\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"items\": [\n {\n \"name\": \"<string>\",\n \"unit_price\": 2,\n \"quantity\": 2,\n \"amount\": 2,\n \"description\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"action_history": [
{
"comment": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"user_id": 123,
"user_name": "<string>"
}
],
"amount": 123,
"ap_payment_method_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ap_payment_method_name": "<string>",
"ap_vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ap_vendor_name": "<string>",
"api_app_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approval_steps": [
{
"completed": true,
"completed_timestamp": "2023-11-07T05:31:56Z",
"num_approvals_required": 123,
"user_approvals": [
{
"approval_comment": "<string>",
"approval_given": true,
"approval_timestamp": "2023-11-07T05:31:56Z",
"name": "<string>",
"user_id": 123
}
]
}
],
"created": "2023-11-07T05:31:56Z",
"currency": "<string>",
"description": "<string>",
"external_id": "<string>",
"file_url": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"amount": 2,
"description": "<string>",
"name": "<string>",
"quantity": 2,
"unit_price": 2
}
],
"number": "<string>",
"status": "<string>",
"status_history": [
{
"timestamp": "2023-11-07T05:31:56Z"
}
],
"transfer_history": [
{
"created_timestamp": "2023-11-07T05:31:56Z",
"idempotency_key": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transfer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"transfer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated": "2023-11-07T05:31:56Z"
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
The ID of the user performing this action. This will be displayed in the developer dashboard.
Total payable amount in cents.
x >= 1The funding source for the payable.
If dots_balance is specified, uses the app's Dots wallet balance to pay the payable.
If ach is specified, uses a bank transfer from the app's linked bank account to pay the payable.
If not specified, defaults to ach.
dots_balance, ach Base64 encoded pdf file to attach to payable.
Show child attributes
Show child attributes
Response
Created
Show child attributes
Show child attributes
Total payable amount in cents.
dots_balance, ach Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?

