Puzzle Invoices API
The Invoices API from Puzzle — 2 operation(s) for invoices.
The Invoices API from Puzzle — 2 operation(s) for invoices.
openapi: 3.0.3
info:
title: Puzzle Api Accounts Invoices API
description: Puzzle Api
version: '0'
servers:
- url: https://staging.southparkdata.com/rest/v0
tags:
- name: Invoices
paths:
/company/{id}/invoices:
get:
operationId: invoicesApi
summary: Get Invoices
description: 'Retrieves invoices.
Required scope: read:company'
tags:
- Invoices
parameters:
- name: id
in: path
required: true
description: The company ID
schema:
type: string
minLength: 1
description: Partner-facing external identifier
- name: from
in: query
required: false
schema:
type: string
minLength: 1
description: Calendar date, YYYY-MM-DD
- name: to
in: query
required: false
schema:
type: string
minLength: 1
description: Calendar date, YYYY-MM-DD
- name: customerIds
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: statuses
in: query
required: false
schema:
anyOf:
- type: string
enum:
- Deleted
- Draft
- Posted
- Voided
- Paid
- type: array
items:
type: string
enum:
- Deleted
- Draft
- Posted
- Voided
- Paid
- name: coaKeys
in: query
required: false
schema:
anyOf:
- type: string
minLength: 1
description: Chart-of-accounts key
- type: array
items:
type: string
minLength: 1
description: Chart-of-accounts key
- name: isPaid
in: query
required: false
schema:
type: string
description: Boolean flag; "true" enables, any other value disables
- name: minAmount
in: query
required: false
schema:
type: string
minLength: 1
description: Arbitrary-precision decimal, serialized as a string
- name: maxAmount
in: query
required: false
schema:
type: string
minLength: 1
description: Arbitrary-precision decimal, serialized as a string
- name: sortBy
in: query
required: false
schema:
type: string
enum:
- AMOUNT_DESC
- AMOUNT_ASC
- CUSTOMER_DESC
- CUSTOMER_ASC
- DESCRIPTOR_DESC
- DESCRIPTOR_ASC
- DUE_DATE_DESC
- DUE_DATE_ASC
- ISSUE_DATE_DESC
- ISSUE_DATE_ASC
- name: count
in: query
required: false
schema:
type: integer
- name: after
in: query
required: false
schema:
type: string
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
customerId:
type: string
minLength: 1
description: Partner-facing external identifier
nullable: true
issueDate:
type: string
minLength: 1
description: Calendar date, YYYY-MM-DD
dueDate:
type: string
minLength: 1
description: Calendar date, YYYY-MM-DD
nullable: true
nativeId:
type: string
nullable: true
description:
type: string
nullable: true
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
documents:
type: array
items:
type: object
properties:
file:
type: object
properties:
id:
type: string
filename:
type: string
nullable: true
contentType:
type: string
size:
type: integer
isDeleted:
type: boolean
downloadInfo:
type: object
properties:
signedUrl:
type: string
urlExpiresAt:
type: string
minLength: 1
description: ISO 8601 timestamp
required:
- signedUrl
- urlExpiresAt
parseError:
type: string
nullable: true
parseType:
type: string
enum:
- bill
- invoice
- receipt
- bankStatement
- unknown
nullable: true
required:
- id
- filename
- contentType
- size
- isDeleted
- downloadInfo
- parseError
- parseType
uploadActorType:
type: string
enum:
- SYSTEM_ACTOR
- TRAIN_ACTOR
- USER_ACTOR
- USER_ACTOR_VIA_AI
- ADMIN_ACTOR
- AI_ACTOR
required:
- file
- uploadActorType
lines:
type: array
items:
type: object
properties:
id:
type: string
minLength: 1
description: Partner-facing external identifier
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
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
coaKey:
type: string
minLength: 1
description: Chart-of-accounts key
quantity:
type: string
minLength: 1
description: Arbitrary-precision decimal, serialized as a string
nullable: true
unitPrice:
type: string
minLength: 1
description: Arbitrary-precision decimal, serialized as a string
nullable: true
productId:
type: string
minLength: 1
description: Partner-facing external identifier
nullable: true
description:
type: string
nullable: true
required:
- id
- classifications
- amount
- coaKey
- quantity
- unitPrice
- description
status:
type: string
enum:
- Deleted
- Draft
- Posted
- Voided
- Paid
contractId:
type: string
minLength: 1
description: Partner-facing external identifier
nullable: true
required:
- id
- issueDate
- dueDate
- nativeId
- description
- amount
- documents
- lines
- status
pageInfo:
type: object
properties:
endCursor:
type: string
nullable: true
hasNextPage:
type: boolean
total:
type: integer
nullable: true
required:
- endCursor
- hasNextPage
- total
total:
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
required:
- items
- pageInfo
- total
post:
operationId: createInvoiceApi
summary: Create Invoice
description: 'Creates an invoice for the company.
Required scope: write:invoice'
tags:
- Invoices
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
nativeId:
type: string
customerId:
type: string
minLength: 1
description: Partner-facing external identifier
description:
type: string
status:
type: string
enum:
- Deleted
- Draft
- Posted
- Voided
- Paid
issueDate:
type: string
minLength: 1
description: Calendar date, YYYY-MM-DD
dueDate:
type: string
minLength: 1
description: Calendar date, YYYY-MM-DD
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
quantity:
type: string
minLength: 1
description: Arbitrary-precision decimal, serialized as a string
unitPrice:
type: string
minLength: 1
description: Arbitrary-precision decimal, serialized as a string
description:
type: string
classifications:
type: array
items:
type: object
properties:
class:
type: string
minLength: 1
segment:
type: string
minLength: 1
required:
- class
- segment
productId:
type: string
minLength: 1
description: Partner-facing external identifier
productName:
type: string
schedule:
type: object
properties:
dateRange:
type: object
properties:
fromInclusive:
type: string
minLength: 1
description: Calendar date, YYYY-MM-DD
toInclusive:
type: string
minLength: 1
description: Calendar date, YYYY-MM-DD
required:
- fromInclusive
- toInclusive
postingMethod:
type: string
enum:
- automatically
- userConfirm
required:
- dateRange
revRecOptions:
anyOf:
- type: object
properties:
accountingConfigurationId:
type: string
minLength: 1
description: Partner-facing external identifier
required:
- accountingConfigurationId
additionalProperties: false
- type: object
properties:
accountingOptions:
type: object
properties:
timing:
type: string
enum:
- OverTime
- PointInTime
calculation:
type: string
enum:
- Days360
- DaysActual
- Manual
- PercentageBased
- StraightLineByPeriod
- StraightLineDaily
- StraightLineMonthly
category:
type: string
minLength: 1
description: Chart-of-accounts key
firstPeriodAllocation:
type: string
enum:
- DayBased
- FullMonth
- HalfMonth
- Mid
- Zero
required:
- timing
required:
- accountingOptions
additionalProperties: false
required:
- amount
- coaKey
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:
- customerId
- issueDate
- lines
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
id:
type: string
minLength: 1
description: Partner-facing external identifier
customerId:
type: string
minLength: 1
description: Partner-facing external identifier
nullable: true
issueDate:
type: string
minLength: 1
description: Calendar date, YYYY-MM-DD
dueDate:
type: string
minLength: 1
description: Calendar date, YYYY-MM-DD
nullable: true
nativeId:
type: string
nullable: true
description:
type: string
nullable: true
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
documents:
type: array
items:
type: object
properties:
file:
type: object
properties:
id:
type: string
filename:
type: string
nullable: true
contentType:
type: string
size:
type: integer
isDeleted:
type: boolean
downloadInfo:
type: object
properties:
signedUrl:
type: string
urlExpiresAt:
type: string
minLength: 1
description: ISO 8601 timestamp
required:
- signedUrl
- urlExpiresAt
parseError:
type: string
nullable: true
parseType:
type: string
enum:
- bill
- invoice
- receipt
- bankStatement
- unknown
nullable: true
required:
- id
- filename
- contentType
- size
- isDeleted
- downloadInfo
- parseError
- parseType
uploadActorType:
type: string
enum:
- SYSTEM_ACTOR
- TRAIN_ACTOR
- USER_ACTOR
- USER_ACTOR_VIA_AI
- ADMIN_ACTOR
- AI_ACTOR
required:
- file
- uploadActorType
lines:
type: array
items:
type: object
properties:
id:
type: string
minLength: 1
description: Partner-facing external identifier
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
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
coaKey:
type: string
minLength: 1
description: Chart-of-accounts key
quantity:
type: string
minLength: 1
description: Arbitrary-precision decimal, serialized as a string
nullable: true
unitPrice:
type: string
minLength: 1
description: Arbitrary-precision decimal, serialized as a string
nullable: true
productId:
type: string
minLength: 1
description: Partner-facing external identifier
nullable: true
description:
type: string
nullable: true
createdAt:
type: string
minLength: 1
description: ISO 8601 timestamp
updatedAt:
type: string
minLength: 1
description: ISO 8601 timestamp
removedAt:
type: string
minLength: 1
description: ISO 8601 timestamp
nullable: true
required:
- id
- classifications
- amount
- coaKey
- quantity
- unitPrice
- description
- createdAt
- updatedAt
- removedAt
status:
type: string
enum:
- Deleted
- Draft
- Posted
- Voided
- Paid
contractId:
type: string
minLength: 1
description: Partner-facing external identifier
nullable: true
createdAt:
type: string
minLength: 1
description: ISO 8601 timestamp
updatedAt:
type: string
minLength: 1
description: ISO 8601 timestamp
removedAt:
type: string
minLength: 1
description: ISO 8601 timestamp
nullable: true
required:
- id
- issueDate
- dueDate
- nativeId
- description
- amount
- documents
- lines
- status
- createdAt
- updatedAt
- removedAt
/company/{id}/invoices/{invoiceId}:
get:
operationId: invoiceApi
summary: Get Invoice
description: 'Retrieves an invoice.
Required scope: read:company'
tags:
- Invoices
parameters:
- name: id
in:
# --- truncated at 32 KB (58 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/puzzle/refs/heads/main/openapi/puzzle-invoices-api-openapi.yml