Full invoice detail (get_payable_by_id)
Gets the complete detail of a specific invoice by ID via get_payable_by_id. Includes accounting codes, resolved supplier, and analytical fields.
87/100ยท๐ Ad hocยทBeginnerControllerAP Manager
ReconciliationERP exportget_payable_by_id
๐ฏ Skill purpose
Gets the complete detail of a specific invoice by ID via get_payable_by_id. Includes accounting codes, resolved supplier, and analytical fields.
๐ What it produces
Full invoice record: amount, supplier, accounting codes, analytics, and action history.
โก Benefit
Before
Navigation across multiple Spendesk screens to reconstruct the full detail of an invoice.
After
Complete invoice record in a single call, with all metadata.
# Full detail of an invoice (get_payable_by_id)
## Flow: get_payables โ ID โ get_payable_by_id
Do not search by invoice number directly โ first resolve the ID via `get_payables`:
### Step 1 โ Find the invoice ID
```json
{
"companyId": "<companyId>",
"filters": {
"field": "documentaryEvidenceNumber",
"operator": "=",
"value": "INV-2026-001"
},
"pageSize": 5
}
```
Or via description:
```json
{ "field": "description", "operator": "contains", "value": "CBS Consultant" }
```
โ Extract the `id` from the returned payable (e.g. `5c902f76-c87e-59a6-8bb8-4e70fbd1dd39`)
### Step 2 โ Enriched detail
```json
{
"id": "5c902f76-c87e-59a6-8bb8-4e70fbd1dd39"
}
```
## What get_payable_by_id adds vs get_payables
| Information | get_payables | get_payable_by_id |
|-------------|--------------|-------------------|
| Supplier name | โ (only supplierId) | โ
`counterparty.name` |
| Accounting account code | โ (only expenseAccountId) | โ
`lineItems[].expenseAccount.code + description` |
| VAT account code | โ (only taxAccountId) | โ
`lineItems[].vatAccount.code + description` |
| Analytics name | โ (only fieldEntityValueId) | โ
`analyticalProperties[].valueName` |
| Cost center name | โ (in analyticalFieldAssociations) | โ
`costCenterName` (at root) |
| Team name | โ | โ
`teamName` |
| Amortization | โ | โ
`amortisation` (null if absent) |
| Supplier AP code | โ | โ
`counterparty.accountPayable.generalAccountCode` |
Example of an enriched response:
```json
{
"counterparty": {
"id": "76r950em3qde5o",
"type": "supplier",
"name": "Think Software", // โ resolved name
"accountPayable": {
"generalAccountCode": "Think Software", // โ AP code
"auxiliaryAccountCode": ""
}
},
"lineItems": [{
"expenseAccount": {
"code": "622800",
"description": "622800 - Other fees and intermediaries" // โ resolved account
},
"vatAccount": { "code": "445660", "rate": 20 }, // โ resolved VAT
"analyticalProperties": [{
"fieldName": "Analytic codes",
"valueName": "Banking investments" // โ resolved analytics
}],
"costCenterName": "X-old Banking" // โ resolved cost center
}],
"teamName": "Banking"
}
```
## โ ๏ธ Different naming between get_payables and get_payable_by_id
Both endpoints use different field names for the same data:
| Concept | get_payables | get_payable_by_id |
|---------|--------------|-------------------|
| Accounting status | `state` | `bookkeepingStatus` |
| Detail lines | `itemLines[]` | `lineItems[]` |
| Spendesk entry date | `firstCreatedAt` | `createdAt` |
| ERP export date | `firstExportedAt` | `exportedAt` |
| User ID | `memberId` | `userId` |
| Due date | `dueDate` | `invoiceDueDate` |
| Document date | `creationDate` (datetime) | `payableDate` (date) |
โ If your code handles both types of response, adapt field names according to the endpoint called.
## What is ABSENT from get_payable_by_id
`get_payable_by_id` does not return:
- `spendingAmount` / `spendingCurrency` / `spendingExchangeRate` โ for the original spending currency, use `get_payables`
- Full `documentaryEvidence` (validity, compliances) โ `invoiceNumber` is at the root but the validation structure is not there
- `kind` field (`expense` vs `reversal`)
## When to use which?
| Need | Recommended tool |
|--------|-----------------|
| List + filter invoices | `get_payables` |
| Resolved names (supplier, accounts, analytics) | `get_payable_by_id` |
| Original spending currency (spendingAmount) | `get_payables` |
| Amortization / full GL codes | `get_payable_by_id` |
## Example prompts
- "Show me the full detail of the CBS Consultant invoice with the accounting codes"
- "What is the expense account code of the Docusign invoice?"
- "Show the analytics and cost center of invoice INV-2026-001"
How to install this skill
/
- 1Download the file
s20-detail-complet-facture.mdusing the button above. - 2Place the file in the
.claude/directory of your project (or~/.claude/for a global install).cp s20-detail-complet-facture.md .claude/s20-detail-complet-facture.md - 3Use in Claude Code โ the skill is automatically discovered. Describe your need in natural language and Claude will apply the skill instructions.
๐ก Make sure the Spendesk MCP is configured in your
.claude/settings.json with the tools get_payable_by_id.Similar skills
โ
Top