Approve a payable
curl --request POST \
--url https://api.dots.dev/api/v2/accounts-payable/payables/{payable_id}/approve \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"acting_user_id": 123,
"comment": "<string>"
}
'import requests
url = "https://api.dots.dev/api/v2/accounts-payable/payables/{payable_id}/approve"
payload = {
"acting_user_id": 123,
"comment": "<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, comment: '<string>'})
};
fetch('https://api.dots.dev/api/v2/accounts-payable/payables/{payable_id}/approve', 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/{payable_id}/approve",
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,
'comment' => '<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/{payable_id}/approve"
payload := strings.NewReader("{\n \"acting_user_id\": 123,\n \"comment\": \"<string>\"\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/{payable_id}/approve")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"acting_user_id\": 123,\n \"comment\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dots.dev/api/v2/accounts-payable/payables/{payable_id}/approve")
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 \"comment\": \"<string>\"\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"
}accounts-payable
Approve a payable
Approve a payable
POST
/
v2
/
accounts-payable
/
payables
/
{payable_id}
/
approve
Approve a payable
curl --request POST \
--url https://api.dots.dev/api/v2/accounts-payable/payables/{payable_id}/approve \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"acting_user_id": 123,
"comment": "<string>"
}
'import requests
url = "https://api.dots.dev/api/v2/accounts-payable/payables/{payable_id}/approve"
payload = {
"acting_user_id": 123,
"comment": "<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, comment: '<string>'})
};
fetch('https://api.dots.dev/api/v2/accounts-payable/payables/{payable_id}/approve', 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/{payable_id}/approve",
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,
'comment' => '<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/{payable_id}/approve"
payload := strings.NewReader("{\n \"acting_user_id\": 123,\n \"comment\": \"<string>\"\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/{payable_id}/approve")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"acting_user_id\": 123,\n \"comment\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dots.dev/api/v2/accounts-payable/payables/{payable_id}/approve")
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 \"comment\": \"<string>\"\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.
Path Parameters
The ID of the Payable
Body
application/json
Response
200 - application/json
OK
Show child attributes
Show child attributes
Total payable amount in cents.
Available options:
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?
⌘I

