curl --request DELETE \
--url https://api.app.lastaccountingcompany.com/portal/sheet/attachments/{filename} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.app.lastaccountingcompany.com/portal/sheet/attachments/{filename}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.app.lastaccountingcompany.com/portal/sheet/attachments/{filename}', 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.app.lastaccountingcompany.com/portal/sheet/attachments/{filename}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.app.lastaccountingcompany.com/portal/sheet/attachments/{filename}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.app.lastaccountingcompany.com/portal/sheet/attachments/{filename}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.app.lastaccountingcompany.com/portal/sheet/attachments/{filename}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"deleted": true,
"resource_ref": {
"uri": "<string>",
"revision": "<string>"
},
"receipt": {
"uri": "<string>",
"operation": {
"id": "<string>",
"version": 2
},
"tenant_id": "<string>",
"actor": {
"kind": "lac_internal",
"realm": "<string>",
"subject": "<string>",
"tenant_id": "<string>"
},
"status": "succeeded",
"reason": "<string>",
"input_hash": "<string>",
"readback": {
"canonical": [
{
"uri": "<string>",
"revision": "<string>"
}
],
"portal": [
{
"uri": "<string>",
"revision": "<string>"
}
]
},
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"mutations": [
{
"uri": "<string>",
"revision": "<string>"
}
],
"evidence": [
{
"uri": "<string>",
"digest": "<string>",
"media_type": "<string>",
"size": 1
}
],
"failure": {
"class": "conflict",
"message": "<string>",
"no_external_effects": true,
"sqlstate": "<string>"
}
}
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}Detach a portal upload from one exact Books row
Removes only the row association created by a portal upload; it never deletes the canonical document or ledger evidence. Requires an interactive admin/operator/existing approver (or explicitly confirmed LAC staff write); API keys and connector OAuth tokens are read-only here. resource_uri and resource_revision are required; derived payslip rows are read-only.
curl --request DELETE \
--url https://api.app.lastaccountingcompany.com/portal/sheet/attachments/{filename} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.app.lastaccountingcompany.com/portal/sheet/attachments/{filename}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.app.lastaccountingcompany.com/portal/sheet/attachments/{filename}', 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.app.lastaccountingcompany.com/portal/sheet/attachments/{filename}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.app.lastaccountingcompany.com/portal/sheet/attachments/{filename}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.app.lastaccountingcompany.com/portal/sheet/attachments/{filename}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.app.lastaccountingcompany.com/portal/sheet/attachments/{filename}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"deleted": true,
"resource_ref": {
"uri": "<string>",
"revision": "<string>"
},
"receipt": {
"uri": "<string>",
"operation": {
"id": "<string>",
"version": 2
},
"tenant_id": "<string>",
"actor": {
"kind": "lac_internal",
"realm": "<string>",
"subject": "<string>",
"tenant_id": "<string>"
},
"status": "succeeded",
"reason": "<string>",
"input_hash": "<string>",
"readback": {
"canonical": [
{
"uri": "<string>",
"revision": "<string>"
}
],
"portal": [
{
"uri": "<string>",
"revision": "<string>"
}
]
},
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"mutations": [
{
"uri": "<string>",
"revision": "<string>"
}
],
"evidence": [
{
"uri": "<string>",
"digest": "<string>",
"media_type": "<string>",
"size": 1
}
],
"failure": {
"class": "conflict",
"message": "<string>",
"no_external_effects": true,
"sqlstate": "<string>"
}
}
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}Authorizations
Portal API key minted in portal Settings → API access. Scope read or write; pinned to one company. Send as Authorization: Bearer lac_sk_....
Path Parameters
The stored filename of the upload.
Query Parameters
Canonical association identity returned by the exact row attachment list.
1 - 256Target company. Optional — API keys are pinned to one company, and single-company sessions default to it.
books, vat Display context from a served row; never canonical identity.