Puzzle JournalEntry API
The JournalEntry API from Puzzle — 2 operation(s) for journalentry.
The JournalEntry API from Puzzle — 2 operation(s) for journalentry.
openapi: 3.0.3
info:
title: Puzzle Api Accounts JournalEntry API
description: Puzzle Api
version: '0'
servers:
- url: https://staging.southparkdata.com/rest/v0
tags:
- name: JournalEntry
paths:
/company/{id}/journalEntry:
post:
operationId: upsertJournalEntry
summary: Create Journal Entry
description: 'Required scope: write:journal
Journal entries are the entries made in a company''s ledger accounts as a way of recording financial impact. The line items for each journal entry should balance to 0.
Create Journal Entries endpoint creates a Journal Entry into our Gateway and not on our Ledger. Once the Gateway receives a Journal Entry, you get an OK response. Ledger Journal Entries are created async and can be retrieved through the Get Journal Entries endpoint.
Puzzle journal entries are immutable. This means that when an update is made, 2 additional journal entries get created - one to reverse the original journal entry and another to reflect the updates. Reversal journal entries can be identified by their description field - they will have descriptions matching "Reversal of {{journal entry id}}".
All Puzzle companies have both cash and accrual journal entries; they are distinct populations.'
tags:
- JournalEntry
parameters:
- name: id
in: path
required: true
description: The company ID
schema:
type: string
minLength: 1
description: Partner-facing external identifier
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
basis:
type: array
items:
type: string
memo:
type: string
postingDate:
type: string
minLength: 1
description: Calendar date, YYYY-MM-DD
type:
type: string
enum:
- Journal
- Transaction
nativeTransactionId:
type: string
createdFor:
type: string
lines:
type: array
items:
type: object
properties:
id:
type: string
minLength: 1
description: Partner-facing external identifier
amount:
type: string
minLength: 1
description: Arbitrary-precision decimal, serialized as a string
coaKey:
type: string
minLength: 1
description: Chart-of-accounts key
description:
type: string
manualJournalEntryId:
type: string
minLength: 1
description: Partner-facing external identifier
classifications:
type: array
items:
type: object
properties:
class:
type: string
minLength: 1
segment:
type: string
minLength: 1
required:
- class
- segment
userDefinedMetadata:
type: object
additionalProperties: {}
nullable: true
vendorId:
type: string
minLength: 1
description: Partner-facing external identifier
vendorName:
type: string
customerId:
type: string
minLength: 1
description: Partner-facing external identifier
customerName:
type: string
required:
- amount
- coaKey
- description
document:
type: object
properties:
documentType:
type: string
enum:
- Receipt
- Bill
- Invoice
fileName:
type: string
minLength: 1
contentType:
type: string
minLength: 1
base64File:
type: string
minLength: 1
nativeDocumentId:
type: string
minLength: 1
required:
- documentType
- fileName
- contentType
- base64File
- nativeDocumentId
required:
- basis
- memo
- postingDate
- lines
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
summary:
type: object
properties:
requested:
type: integer
success:
type: integer
error:
type: integer
required:
- requested
- success
- error
results:
type: array
items:
type: object
properties:
index:
type: integer
status:
type: string
enum:
- success
- error
id:
type: string
minLength: 1
description: Partner-facing external identifier
nativeId:
type: string
error:
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
required:
- index
- status
required:
- summary
- results
/company/{id}/journalEntry/{journalEntryId}:
delete:
operationId: deleteJournalEntry
summary: Delete Journal Entry
description: 'Required scope: write:journal
Journal entries are the entries made in a company''s ledger accounts as a way of recording financial impact.
Delete Journal Entry endpoint will delete a draft journal entry and void a posted one.'
tags:
- JournalEntry
parameters:
- name: id
in: path
required: true
description: The company ID
schema:
type: string
minLength: 1
description: Partner-facing external identifier
- name: journalEntryId
in: path
required: true
description: The journal entry ID
schema:
type: string
minLength: 1
description: Partner-facing external identifier
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
error:
type: string
required:
- success