accounts-payable
Submit a payable for approval
users
transfers
payout-links
payments
payment-intents
payment-customers
checkout-sessions
accounts-payable
- GETList all vendors
- POSTCreate a vendor
- GETGet vendor details
- DELDelete a vendor
- GETList all payment methods for a vendor
- POSTCreate a payment method for a vendor
- GETGet vendor payment method details
- DELDelete a vendor payment method
- GETList all payables
- POSTCreate a payable
- POSTCreate a payable from a file
- GETGet payable details
- PATCHUpdate a payable
- POSTUpload file to the payable
- DELDelete file from the payable
- POSTCancel a payable
- POSTSubmit a payable for approval
- POSTApprove a payable
- POSTReject a payable
- POSTPay a payable
- GETList all approval policies
- POSTCreate an approval policy
- DELDelete an approval policy
- PATCHUpdate priority of an approval policy
- GETList all approvers for api app
apps
payment-methods
organizations
accounts-payable
Submit a payable for approval
Submit a payable for approval
curl --request POST \
--url https://api.dots.dev/api/v2/accounts-payable/payables/{payable_id}/submit-for-approval \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"acting_user_id": 123,
"comment": "<string>"
}'
{
"action_history": [
{
"action": "create",
"comment": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"user_id": 123,
"user_name": "<string>",
"user_role": "admin"
}
],
"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": [
{
"status": "created",
"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
The ID of the user performing this action. This will be displayed in the developer dashboard.
Response
200 - application/json
OK
Available options:
create
, cancel
, submit_for_approval
, approve
, reject
, initiate_payment
, retry_payment
Available options:
admin
, viewer
, payer
, ap_approver
, ap_creator
Total payable amount in cents.
Total line item amount in cents. This should be the unit price multiplied by the quantity.
Required range:
x > 1
Minimum length:
1
Required range:
x > 1
Item unit price in cents.
Required range:
x > 1
curl --request POST \
--url https://api.dots.dev/api/v2/accounts-payable/payables/{payable_id}/submit-for-approval \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"acting_user_id": 123,
"comment": "<string>"
}'
{
"action_history": [
{
"action": "create",
"comment": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"user_id": 123,
"user_name": "<string>",
"user_role": "admin"
}
],
"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": [
{
"status": "created",
"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"
}