Improve invoice period data and POS add-on validation
This commit is contained in:
+218
-5
@@ -7465,7 +7465,8 @@ paths:
|
||||
description: Invoicing periods retrieved successfully
|
||||
content:
|
||||
application/json:
|
||||
schema: {}
|
||||
schema:
|
||||
$ref: '#/components/schemas/InvoicingPeriodResponseEnvelope'
|
||||
|
||||
/superuser/invoicing/period/distribution/fixed-pricing:
|
||||
get:
|
||||
@@ -10916,23 +10917,89 @@ paths:
|
||||
get:
|
||||
tags:
|
||||
- Attachments
|
||||
summary: Download order attachment
|
||||
description: Download a specific order attachment
|
||||
summary: Get order attachment download link
|
||||
description: Return a legacy HTTPS download link for a specific order attachment
|
||||
operationId: downloadOrderAttachment
|
||||
parameters:
|
||||
- name: id
|
||||
- name: order_id
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
minimum: 1
|
||||
- name: attachment_id
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
minimum: 1
|
||||
responses:
|
||||
'200':
|
||||
description: Attachment downloaded successfully
|
||||
description: Attachment download link resolved successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/OrderAttachmentDownloadLinkResponse'
|
||||
'400': { $ref: '#/components/responses/BadRequest' }
|
||||
'401': { $ref: '#/components/responses/Unauthorized' }
|
||||
'403': { $ref: '#/components/responses/Forbidden' }
|
||||
'404': { $ref: '#/components/responses/NotFound' }
|
||||
'502':
|
||||
description: Attachment storage is unavailable
|
||||
|
||||
/orders/attachments/content:
|
||||
get:
|
||||
tags:
|
||||
- Attachments
|
||||
summary: Stream authenticated order attachment content
|
||||
description: Streams an attachment after validating order scope and attachment ownership
|
||||
operationId: streamOrderAttachmentContent
|
||||
parameters:
|
||||
- name: order_id
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
minimum: 1
|
||||
- name: attachment_id
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
minimum: 1
|
||||
- name: disposition
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum: [inline, attachment]
|
||||
default: inline
|
||||
responses:
|
||||
'200':
|
||||
description: Attachment content streamed successfully
|
||||
headers:
|
||||
Content-Disposition:
|
||||
schema:
|
||||
type: string
|
||||
content:
|
||||
application/octet-stream:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
image/*:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
application/pdf:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
'400': { $ref: '#/components/responses/BadRequest' }
|
||||
'401': { $ref: '#/components/responses/Unauthorized' }
|
||||
'403': { $ref: '#/components/responses/Forbidden' }
|
||||
'404': { $ref: '#/components/responses/NotFound' }
|
||||
'502':
|
||||
description: Attachment storage is unavailable
|
||||
|
||||
# Forms Endpoints
|
||||
/form:
|
||||
@@ -17737,6 +17804,142 @@ components:
|
||||
- meta
|
||||
- includes
|
||||
|
||||
OrderAttachmentDownloadLinkResponse:
|
||||
type: object
|
||||
required: [success, data, meta, includes]
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
enum: [true]
|
||||
data:
|
||||
type: object
|
||||
required: [download_link]
|
||||
properties:
|
||||
download_link:
|
||||
type: string
|
||||
format: uri
|
||||
pattern: '^https://'
|
||||
meta:
|
||||
type: object
|
||||
additionalProperties: true
|
||||
includes:
|
||||
type: object
|
||||
additionalProperties: true
|
||||
|
||||
InvoicingPeriodResponseEnvelope:
|
||||
type: object
|
||||
required: [success, data, meta, includes]
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
enum: [true]
|
||||
data:
|
||||
$ref: '#/components/schemas/InvoicingPeriodData'
|
||||
meta:
|
||||
type: object
|
||||
additionalProperties: true
|
||||
includes:
|
||||
type: object
|
||||
additionalProperties: true
|
||||
|
||||
InvoicingPeriodData:
|
||||
type: object
|
||||
required: [dateFrom, dateTo, types]
|
||||
properties:
|
||||
dateFrom:
|
||||
type: string
|
||||
format: date
|
||||
dateTo:
|
||||
type: string
|
||||
format: date
|
||||
types:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/InvoicingPeriodCustomer'
|
||||
|
||||
InvoicingPeriodCustomer:
|
||||
type: object
|
||||
required: [customer_number, customer_name, transactions, invoice_collections]
|
||||
additionalProperties: true
|
||||
properties:
|
||||
customer_number:
|
||||
type: integer
|
||||
customer_name:
|
||||
type: string
|
||||
transactions:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/InvoicingPeriodTransaction'
|
||||
invoice_collections:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/InvoicingPeriodInvoiceCollection'
|
||||
|
||||
InvoicingPeriodTransaction:
|
||||
type: object
|
||||
required: [id, booked, invoice_state]
|
||||
additionalProperties: true
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
invoice_collection_id:
|
||||
type: integer
|
||||
nullable: true
|
||||
booked:
|
||||
type: boolean
|
||||
invoice_state:
|
||||
type: string
|
||||
enum: [open, closed, economic_draft, economic_booked]
|
||||
completed_at:
|
||||
type: string
|
||||
format: date-time
|
||||
nullable: true
|
||||
amount:
|
||||
type: number
|
||||
format: float
|
||||
|
||||
InvoicingPeriodInvoiceCollection:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- invoice_collection_id
|
||||
- customer_number
|
||||
- state
|
||||
- order_ids
|
||||
- order_count
|
||||
- total_net_amount
|
||||
additionalProperties: true
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
invoice_collection_id:
|
||||
type: integer
|
||||
customer_number:
|
||||
type: integer
|
||||
name:
|
||||
type: string
|
||||
external_id:
|
||||
type: string
|
||||
nullable: true
|
||||
booked_invoice_id:
|
||||
type: integer
|
||||
nullable: true
|
||||
state:
|
||||
type: string
|
||||
enum: [open, closed, economic_draft, economic_booked]
|
||||
order_ids:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
order_count:
|
||||
type: integer
|
||||
minimum: 0
|
||||
total_net_amount:
|
||||
type: number
|
||||
format: float
|
||||
|
||||
CollectedInvoiceEconomicCompareResponse:
|
||||
type: object
|
||||
description: Result of comparing a collected invoice with its E-conomic counterpart
|
||||
@@ -17827,6 +18030,7 @@ components:
|
||||
type: integer
|
||||
economic:
|
||||
type: object
|
||||
required: [draft_id, booked_id, state, available_pdf_type]
|
||||
properties:
|
||||
draft_id:
|
||||
type: integer
|
||||
@@ -17834,6 +18038,15 @@ components:
|
||||
booked_id:
|
||||
type: integer
|
||||
nullable: true
|
||||
state:
|
||||
type: string
|
||||
enum: [draft, booked, none]
|
||||
description: Current authoritative e-conomic target state
|
||||
available_pdf_type:
|
||||
type: string
|
||||
enum: [draft, booked]
|
||||
nullable: true
|
||||
description: PDF target that callers should request
|
||||
customer:
|
||||
$ref: '#/components/schemas/CollectedInvoiceEconomicV2CustomerSummary'
|
||||
internal:
|
||||
|
||||
Reference in New Issue
Block a user