Puzzle Transactions API
The Transactions API from Puzzle — 3 operation(s) for transactions.
The Transactions API from Puzzle — 3 operation(s) for transactions.
openapi: 3.0.3
info:
title: Puzzle Api Accounts Transactions API
description: Puzzle Api
version: '0'
servers:
- url: https://staging.southparkdata.com/rest/v0
tags:
- name: Transactions
paths:
/company/{id}/transactions:
get:
operationId: getTransactions
summary: Get Transactions
description: 'Get transactions by filter
Required scope: read:company'
tags:
- Transactions
parameters:
- name: id
in: path
required: true
description: The company ID
schema:
type: string
minLength: 1
description: Partner-facing external identifier
- name: startDate
in: query
required: true
schema:
type: string
minLength: 1
description: Calendar date, YYYY-MM-DD
- name: endDate
in: query
required: true
schema:
type: string
minLength: 1
description: Calendar date, YYYY-MM-DD
- name: accountIds
in: query
required: false
schema:
anyOf:
- type: string
minLength: 1
description: Partner-facing external identifier
- type: array
items:
type: string
minLength: 1
description: Partner-facing external identifier
- name: vendorIds
in: query
required: false
schema:
anyOf:
- type: string
minLength: 1
description: Partner-facing external identifier
- type: array
items:
type: string
minLength: 1
description: Partner-facing external identifier
- name: coaKeys
in: query
required: false
schema:
anyOf:
- type: string
- type: array
items:
type: string
- name: status
in: query
required: false
schema:
type: string
enum:
- Finalized
- NotFinalized
- NotCategorized
- name: sortBy
in: query
required: false
schema:
type: string
enum:
- ABS_AMOUNT_ASC
- ABS_AMOUNT_DESC
- AMOUNT_ASC
- AMOUNT_DESC
- DATE_ASC
- DATE_DESC
- DESCRIPTION_ASC
- DESCRIPTION_DESC
- NAME_ASC
- UNCATEGORIZED_AMOUNT_DESC
- VENDOR_ASC
- VENDOR_DESC
- name: after
in: query
required: false
schema:
type: string
- name: count
in: query
required: false
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
items:
type: array
items:
type: object
properties:
id:
type: string
minLength: 1
description: Partner-facing external identifier
amount:
type: object
properties:
amount:
type: string
minLength: 1
description: Arbitrary-precision decimal, serialized as a string
currency:
type: string
minLength: 3
maxLength: 3
description: ISO 4217 currency code
required:
- amount
- currency
description: A monetary amount with its currency
descriptor:
type: string
timestamp:
type: string
minLength: 1
description: ISO 8601 timestamp
memo:
type: string
nullable: true
nativeId:
type: string
nullable: true
category:
type: string
nullable: true
coaKey:
type: string
nullable: true
accountId:
type: string
minLength: 1
description: Partner-facing external identifier
nullable: true
status:
type: string
enum:
- Finalized
- NotFinalized
- NotCategorized
nullable: true
vendorId:
type: string
minLength: 1
description: Partner-facing external identifier
nullable: true
customerId:
type: string
minLength: 1
description: Partner-facing external identifier
nullable: true
documents:
type: array
items:
type: object
properties:
id:
type: string
documentType:
type: string
enum:
- Receipt
- Bill
- Invoice
contentType:
type: string
downloadInfo:
type: object
properties:
signedUrl:
type: string
urlExpiresAt:
type: string
minLength: 1
description: ISO 8601 timestamp
required:
- signedUrl
- urlExpiresAt
required:
- id
- documentType
- contentType
- downloadInfo
nullable: true
classifications:
type: array
items:
type: object
properties:
class:
type: string
description:
type: string
nullable: true
segments:
type: array
items:
type: object
properties:
id:
type: string
minLength: 1
description: Partner-facing external identifier
nullable: true
segment:
type: string
description:
type: string
nullable: true
required:
- id
- segment
- description
required:
- class
- description
- segments
nullable: true
required:
- id
- amount
- descriptor
- timestamp
- memo
- nativeId
- category
- coaKey
- accountId
- status
- vendorId
- customerId
- documents
- classifications
pageInfo:
type: object
properties:
endCursor:
type: string
nullable: true
hasNextPage:
type: boolean
total:
type: integer
nullable: true
required:
- endCursor
- hasNextPage
- total
required:
- items
- pageInfo
post:
operationId: createTransactions
summary: Create Transactions
description: 'Create multiple transactions for a single financial account.
You can create up to 500 transactions per request
Transactions can only be added to accounts with the following types: Depository, Credit, Investment, Loan, or PaymentProcessing
Transactions are created asynchronously, so the response only includes a mapping of the Puzzle ID to the native ID and the status of the transaction, which will either be pending or duplicate.
pending = The data for that transaction has been saved and is currently being processed. Please allow a couple of minutes for this transaction to show up in the system.
duplicate = There is already a transaction with that same nativeId in the system, so this transaction data was ignored.
The sign on the amount field depends on the account type.
Additional details can be found here.
The category field may or may not directly correspond to an account in the Chart of Accounts. It is used to help Puzzle automatically categorize this transaction. It does not guarantee a specific COA assignment.
Required scope: write:transaction'
tags:
- Transactions
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:
accountId:
type: string
minLength: 1
description: Partner-facing external identifier
transactions:
type: array
items:
type: object
properties:
nativeId:
type: string
timestamp:
type: string
minLength: 1
description: ISO 8601 timestamp
amount:
type: object
properties:
amount:
type: string
minLength: 1
description: Arbitrary-precision decimal, serialized as a string
currency:
type: string
minLength: 3
maxLength: 3
description: ISO 4217 currency code
required:
- amount
- currency
description: A monetary amount with its currency
description:
type: string
category:
type: string
coaKey:
type: string
memo:
type: string
customerId:
type: string
minLength: 1
description: Partner-facing external identifier
vendorId:
type: string
minLength: 1
description: Partner-facing external identifier
merchantName:
type: string
counterpartyName:
type: string
balance:
type: object
properties:
amount:
type: string
minLength: 1
description: Arbitrary-precision decimal, serialized as a string
currency:
type: string
minLength: 3
maxLength: 3
description: ISO 4217 currency code
required:
- amount
- currency
description: A monetary amount with its currency
splits:
type: array
items:
type: object
properties:
amount:
type: string
minLength: 1
description: Arbitrary-precision decimal, serialized as a string
descriptor:
type: string
ledgerCoaKey:
type: string
minLength: 1
description: Chart-of-accounts key
accrualDate:
type: string
minLength: 1
description: Calendar date, YYYY-MM-DD
capitalizable:
type: boolean
customerId:
type: string
minLength: 1
description: Partner-facing external identifier
isBillPayment:
type: boolean
isInvoicePayment:
type: boolean
updateOfSplitId:
type: string
minLength: 1
description: Partner-facing external identifier
vendorPermaName:
type: string
required:
- amount
- descriptor
- ledgerCoaKey
classifications:
type: array
items:
type: object
properties:
class:
type: string
minLength: 1
segment:
type: string
minLength: 1
required:
- class
- segment
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:
- nativeId
- timestamp
- amount
- description
omitAccountSideOfEntry:
type: boolean
required:
- accountId
- transactions
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
transactions:
type: array
items:
type: object
properties:
id:
type: string
minLength: 1
description: Partner-facing external identifier
nativeId:
type: string
status:
type: string
enum:
- pending
- duplicate
required:
- id
- nativeId
- status
required:
- transactions
/company/{id}/transactions/{transactionId}:
get:
operationId: getTransaction
summary: Get Transaction
description: 'Get a single transaction by ID
Required scope: read:company'
tags:
- Transactions
parameters:
- name: id
in: path
required: true
description: The company ID
schema:
type: string
minLength: 1
description: Partner-facing external identifier
- name: transactionId
in: path
required: true
description: The transaction ID
schema:
type: string
minLength: 1
description: Partner-facing external identifier
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
id:
type: string
minLength: 1
description: Partner-facing external identifier
amount:
type: object
properties:
amount:
type: string
minLength: 1
description: Arbitrary-precision decimal, serialized as a string
currency:
type: string
minLength: 3
maxLength: 3
description: ISO 4217 currency code
required:
- amount
- currency
description: A monetary amount with its currency
descriptor:
type: string
timestamp:
type: string
minLength: 1
description: ISO 8601 timestamp
memo:
type: string
nullable: true
nativeId:
type: string
nullable: true
category:
type: string
nullable: true
coaKey:
type: string
nullable: true
accountId:
type: string
minLength: 1
description: Partner-facing external identifier
nullable: true
status:
type: string
enum:
- Finalized
- NotFinalized
- NotCategorized
nullable: true
vendorId:
type: string
minLength: 1
description: Partner-facing external identifier
nullable: true
customerId:
type: string
minLength: 1
description: Partner-facing external identifier
nullable: true
documents:
type: array
items:
type: object
properties:
id:
type: string
documentType:
type: string
enum:
- Receipt
- Bill
- Invoice
contentType:
type: string
downloadInfo:
type: object
properties:
signedUrl:
type: string
urlExpiresAt:
type: string
minLength: 1
description: ISO 8601 timestamp
required:
- signedUrl
- urlExpiresAt
required:
- id
- documentType
- contentType
- downloadInfo
nullable: true
classifications:
type: array
items:
type: object
properties:
class:
type: string
description:
type: string
nullable: true
segments:
type: array
items:
type: object
properties:
id:
type: string
minLength: 1
description: Partner-facing external identifier
nullable: true
segment:
type: string
description:
type: string
nullable: true
required:
- id
- segment
- description
required:
- class
- description
- segments
nullable: true
required:
- id
- amount
- descriptor
- timestamp
- memo
- nativeId
- category
- coaKey
- accountId
- status
- vendorId
- customerId
- documents
- classifications
patch:
operationId: updateTransaction
summary: Update Transaction
description: 'Updates an existing Transaction
Required scope: write:transaction'
tags:
- Transactions
parameters:
- name: id
in: path
required: true
description: The company ID
schema:
type: string
minLength: 1
description: Partner-facing external identifier
- name: transactionId
in: path
required: true
description: The transaction ID
schema:
type: string
minLength: 1
description: Partner-facing external identifier
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
category:
type: string
coaKey:
type: string
minLength: 1
description: Chart-of-accounts key
customerId:
type: string
minLength: 1
description: Partner-facing external identifier
finalize:
type: boolean
vendorId:
type: string
minLength: 1
description: Partner-facing external identifier
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
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
id:
type: string
minLength: 1
description: Partner-facing external identifier
required:
- id
/company/{id}/transactions/{transactionId}/document:
post:
operationId: createTransactionDocument
summary: Create Document
description: 'Create a document for a given transaction.
Required scope: write:transaction'
tags:
- Transactions
parameters:
- name: id
in: path
required: true
description: The company ID
schema:
type: string
minLength: 1
description: Partner-facing external identifier
- name: transactionId
in: path
required: true
description: The transaction ID
schema:
type: string
minLength: 1
description: Partner-facing external identifier
requestBody:
required: true
content:
application/json:
schema:
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
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
transactionId:
type: string
minLength: 1
description: Partner-facing external identifier
nullable: true
manualJournalEntryId:
type: string
minLength: 1
description: Partner-facing external identifier
nullable: true
journalEntryId:
type: string
minLength: 1
description: Partner-facing external identifier
nullable: true
billId:
type: string
minLength: 1
description: Partner-facing external identifier
nullable: true
invoiceId:
type: string
minLength: 1
description: Partner-facing external identifier
nullable: true
document:
type: object
properties:
id:
type: string
documentType:
type: string
enum:
- Receipt
- Bill
- Invoice
contentType:
type: string
downloadInfo:
type: object
properties:
signedUrl:
type: string
urlExpiresAt:
type: string
minLength: 1
description: ISO 8601 timestamp
required:
- signedUrl
- urlExpiresAt
required:
- id
- documentType
- contentType
- downloadInfo
required:
- transactionId
- manualJournalEntryId
- journalEntryId
- billId
- invoiceId
- document