GWM : excell export option added in swagger
This commit is contained in:
parent
95cbdcf7c5
commit
7cd180b4e9
@ -423,6 +423,28 @@ paths:
|
||||
'200':
|
||||
description: Service alerts fetched
|
||||
content: { application/json: { schema: { $ref: '#/components/schemas/ApiResponse' } } }
|
||||
/assets/export:
|
||||
get:
|
||||
tags: [Assets]
|
||||
summary: Export assets CSV (same filters as list)
|
||||
description: |
|
||||
Requires `ASSET` → `export`. Returns CSV (opens in Excel).
|
||||
No `id` column; date/datetime values formatted as `dd-mm-yyyy hh:mm`.
|
||||
parameters:
|
||||
- { name: search, in: query, schema: { type: string } }
|
||||
- { name: status, in: query, schema: { type: string } }
|
||||
- { name: condition, in: query, schema: { type: string } }
|
||||
- { name: item_category_id, in: query, schema: { type: integer } }
|
||||
- { name: item_subcategory_id, in: query, schema: { type: integer } }
|
||||
- { name: plant_id, in: query, schema: { type: integer } }
|
||||
- { name: department_id, in: query, schema: { type: integer } }
|
||||
- { name: is_active, in: query, schema: { type: boolean } }
|
||||
responses:
|
||||
'200':
|
||||
description: CSV export
|
||||
content:
|
||||
text/csv:
|
||||
schema: { type: string }
|
||||
/assets:
|
||||
get:
|
||||
tags: [Assets]
|
||||
|
||||
@ -78,6 +78,27 @@ components:
|
||||
created_at: { type: string, format: date-time }
|
||||
|
||||
paths:
|
||||
/grn/export:
|
||||
get:
|
||||
tags: [GRN]
|
||||
summary: Export GRNs CSV (same filters as list)
|
||||
description: |
|
||||
Requires `GRN` → `export`. Returns CSV (opens in Excel).
|
||||
No `id` column; date/datetime values formatted as `dd-mm-yyyy hh:mm`.
|
||||
parameters:
|
||||
- { name: search, in: query, schema: { type: string, example: 'GRN/2026' } }
|
||||
- { name: status, in: query, schema: { type: string, enum: [POSTED, CANCELLED] } }
|
||||
- { name: po_id, in: query, schema: { type: integer } }
|
||||
- { name: vendor_id, in: query, schema: { type: integer } }
|
||||
- { name: warehouse_id, in: query, schema: { type: integer } }
|
||||
- { name: date_from, in: query, schema: { type: string, format: date } }
|
||||
- { name: date_to, in: query, schema: { type: string, format: date } }
|
||||
responses:
|
||||
'200':
|
||||
description: CSV export
|
||||
content:
|
||||
text/csv:
|
||||
schema: { type: string }
|
||||
/grn:
|
||||
get:
|
||||
tags: [GRN]
|
||||
|
||||
@ -97,6 +97,27 @@ components:
|
||||
created_at: { type: string, format: date-time }
|
||||
|
||||
paths:
|
||||
/purchase-orders/export:
|
||||
get:
|
||||
tags: [Purchase Orders]
|
||||
summary: Export purchase orders CSV (same filters as list)
|
||||
description: |
|
||||
Requires `PURCHASE_ORDER` → `export`. Returns CSV (opens in Excel).
|
||||
No `id` column; date/datetime values formatted as `dd-mm-yyyy hh:mm`.
|
||||
parameters:
|
||||
- { name: search, in: query, schema: { type: string, example: 'PO/2026' } }
|
||||
- { name: status, in: query, schema: { type: string, example: DRAFT } }
|
||||
- { name: po_type, in: query, schema: { type: string, example: RAW_MATERIAL } }
|
||||
- { name: vendor_id, in: query, schema: { type: integer, example: 1 } }
|
||||
- { name: plant_id, in: query, schema: { type: integer, example: 1 } }
|
||||
- { name: date_from, in: query, schema: { type: string, format: date } }
|
||||
- { name: date_to, in: query, schema: { type: string, format: date } }
|
||||
responses:
|
||||
'200':
|
||||
description: CSV export
|
||||
content:
|
||||
text/csv:
|
||||
schema: { type: string }
|
||||
/purchase-orders:
|
||||
get:
|
||||
tags: [Purchase Orders]
|
||||
|
||||
@ -146,6 +146,34 @@ components:
|
||||
is_active: { type: boolean, example: true }
|
||||
|
||||
paths:
|
||||
/vendors/export:
|
||||
get:
|
||||
tags: [Vendors]
|
||||
summary: Export vendors CSV (same filters as list)
|
||||
description: |
|
||||
Requires `VENDOR` → `export`. Returns CSV (opens in Excel).
|
||||
No `id` column; date/datetime values formatted as `dd-mm-yyyy hh:mm`.
|
||||
parameters:
|
||||
- in: query
|
||||
name: search
|
||||
schema: { type: string }
|
||||
- in: query
|
||||
name: status
|
||||
schema: { type: string, enum: [active, inactive, blacklisted] }
|
||||
- in: query
|
||||
name: vendor_type
|
||||
schema:
|
||||
type: string
|
||||
enum: [RAW_MATERIAL, PACKING_MATERIAL, ASSET_CAPITAL, SERVICE, GENERAL]
|
||||
- in: query
|
||||
name: is_active
|
||||
schema: { type: boolean }
|
||||
responses:
|
||||
"200":
|
||||
description: CSV export
|
||||
content:
|
||||
text/csv:
|
||||
schema: { type: string }
|
||||
/vendors:
|
||||
get:
|
||||
tags: [Vendors]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user