Update an deal
curl --request PUT \
--url https://api.abacuslabs.co/deals/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "paid",
"paidAt": "2024-06-15T12:00:00.000Z",
"internalNote": "Payment received via bank transfer"
}
'import requests
url = "https://api.abacuslabs.co/deals/{id}"
payload = {
"status": "paid",
"paidAt": "2024-06-15T12:00:00.000Z",
"internalNote": "Payment received via bank transfer"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
status: 'paid',
paidAt: '2024-06-15T12:00:00.000Z',
internalNote: 'Payment received via bank transfer'
})
};
fetch('https://api.abacuslabs.co/deals/{id}', 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.abacuslabs.co/deals/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'status' => 'paid',
'paidAt' => '2024-06-15T12:00:00.000Z',
'internalNote' => 'Payment received via bank transfer'
]),
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.abacuslabs.co/deals/{id}"
payload := strings.NewReader("{\n \"status\": \"paid\",\n \"paidAt\": \"2024-06-15T12:00:00.000Z\",\n \"internalNote\": \"Payment received via bank transfer\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.abacuslabs.co/deals/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"paid\",\n \"paidAt\": \"2024-06-15T12:00:00.000Z\",\n \"internalNote\": \"Payment received via bank transfer\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.abacuslabs.co/deals/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"paid\",\n \"paidAt\": \"2024-06-15T12:00:00.000Z\",\n \"internalNote\": \"Payment received via bank transfer\"\n}"
response = http.request(request)
puts response.read_body{
"id": "b3b7e6e2-8c2a-4e2a-9b1a-2e4b5c6d7f8a",
"status": "paid",
"dueDate": "2024-06-30T23:59:59.000Z",
"issueDate": "2024-06-01T00:00:00.000Z",
"amount": 1500.75,
"currency": "USD",
"merchant": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Acme Corporation",
"website": "https://acme.com",
"email": "info@acme.com"
},
"paidAt": "2024-06-15T12:00:00.000Z",
"reminderSentAt": "2024-06-10T09:00:00.000Z",
"note": "Thank you for your business.",
"discount": 50,
"subtotal": 1400,
"viewedAt": "2024-06-05T14:30:00.000Z",
"merchantName": "Acme Corporation",
"sentTo": "billing@acme.com",
"sentAt": "2024-06-02T08:00:00.000Z",
"createdAt": "2024-06-01T07:00:00.000Z",
"updatedAt": "2024-06-15T10:00:00.000Z",
"pdfUrl": "https://app.abacuslabs.co/api/download/deal?token=eef58951-1682-4062-b010-425866032390",
"previewUrl": "https://app.abacuslabs.co/i/eef58951-1682-4062-b010-425866032390",
"dealNumber": "D-0001"
}Deals
Update an deal
Update an deal by its unique identifier for the authenticated team.
PUT
/
deals
/
{id}
Update an deal
curl --request PUT \
--url https://api.abacuslabs.co/deals/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "paid",
"paidAt": "2024-06-15T12:00:00.000Z",
"internalNote": "Payment received via bank transfer"
}
'import requests
url = "https://api.abacuslabs.co/deals/{id}"
payload = {
"status": "paid",
"paidAt": "2024-06-15T12:00:00.000Z",
"internalNote": "Payment received via bank transfer"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
status: 'paid',
paidAt: '2024-06-15T12:00:00.000Z',
internalNote: 'Payment received via bank transfer'
})
};
fetch('https://api.abacuslabs.co/deals/{id}', 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.abacuslabs.co/deals/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'status' => 'paid',
'paidAt' => '2024-06-15T12:00:00.000Z',
'internalNote' => 'Payment received via bank transfer'
]),
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.abacuslabs.co/deals/{id}"
payload := strings.NewReader("{\n \"status\": \"paid\",\n \"paidAt\": \"2024-06-15T12:00:00.000Z\",\n \"internalNote\": \"Payment received via bank transfer\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.abacuslabs.co/deals/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"paid\",\n \"paidAt\": \"2024-06-15T12:00:00.000Z\",\n \"internalNote\": \"Payment received via bank transfer\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.abacuslabs.co/deals/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"paid\",\n \"paidAt\": \"2024-06-15T12:00:00.000Z\",\n \"internalNote\": \"Payment received via bank transfer\"\n}"
response = http.request(request)
puts response.read_body{
"id": "b3b7e6e2-8c2a-4e2a-9b1a-2e4b5c6d7f8a",
"status": "paid",
"dueDate": "2024-06-30T23:59:59.000Z",
"issueDate": "2024-06-01T00:00:00.000Z",
"amount": 1500.75,
"currency": "USD",
"merchant": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Acme Corporation",
"website": "https://acme.com",
"email": "info@acme.com"
},
"paidAt": "2024-06-15T12:00:00.000Z",
"reminderSentAt": "2024-06-10T09:00:00.000Z",
"note": "Thank you for your business.",
"discount": 50,
"subtotal": 1400,
"viewedAt": "2024-06-05T14:30:00.000Z",
"merchantName": "Acme Corporation",
"sentTo": "billing@acme.com",
"sentAt": "2024-06-02T08:00:00.000Z",
"createdAt": "2024-06-01T07:00:00.000Z",
"updatedAt": "2024-06-15T10:00:00.000Z",
"pdfUrl": "https://app.abacuslabs.co/api/download/deal?token=eef58951-1682-4062-b010-425866032390",
"previewUrl": "https://app.abacuslabs.co/i/eef58951-1682-4062-b010-425866032390",
"dealNumber": "D-0001"
}Body
application/json
Schema for updating an deal
Response
200 - application/json
Deal updated successfully.
Response after updating an deal