API v1 orders endpoints
This commit is contained in:
parent
7d5155bef6
commit
127ae83f04
9 changed files with 165 additions and 10 deletions
|
|
@ -179,6 +179,65 @@ paths:
|
|||
$ref: '#/definitions/Error404'
|
||||
security:
|
||||
- foodsoft_auth: ['finance:read', 'finance:write']
|
||||
/orders:
|
||||
get:
|
||||
summary: orders
|
||||
tags:
|
||||
- 2. Orders
|
||||
parameters:
|
||||
- $ref: '#/parameters/page'
|
||||
- $ref: '#/parameters/per_page'
|
||||
responses:
|
||||
200:
|
||||
description: success
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
orders:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/definitions/Order'
|
||||
meta:
|
||||
$ref: '#/definitions/Meta'
|
||||
401:
|
||||
description: not logged-in
|
||||
schema:
|
||||
$ref: '#/definitions/Error401'
|
||||
403:
|
||||
description: missing scope or no permission
|
||||
schema:
|
||||
$ref: '#/definitions/Error403'
|
||||
security:
|
||||
- foodsoft_auth: ['orders:read', 'orders:write']
|
||||
/orders/{id}:
|
||||
parameters:
|
||||
- $ref: '#/parameters/idInUrl'
|
||||
get:
|
||||
summary: find order by id
|
||||
tags:
|
||||
- 2. Order
|
||||
responses:
|
||||
200:
|
||||
description: success
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
order:
|
||||
$ref: '#/definitions/Order'
|
||||
401:
|
||||
description: not logged-in
|
||||
schema:
|
||||
$ref: '#/definitions/Error401'
|
||||
403:
|
||||
description: missing scope or no permission
|
||||
schema:
|
||||
$ref: '#/definitions/Error403'
|
||||
404:
|
||||
description: not found
|
||||
schema:
|
||||
$ref: '#/definitions/Error404'
|
||||
security:
|
||||
- foodsoft_auth: ['orders:read', 'orders:write']
|
||||
|
||||
/financial_transaction_classes:
|
||||
get:
|
||||
|
|
@ -436,6 +495,37 @@ definitions:
|
|||
description: name of the class of the transaction
|
||||
required: ['id', 'name', 'financial_transaction_class_id', 'financial_transaction_class_name']
|
||||
|
||||
Order:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
name:
|
||||
type: string
|
||||
description: name of the order's supplier (or stock)
|
||||
starts:
|
||||
type: string
|
||||
format: date-time
|
||||
description: when the order was opened
|
||||
ends:
|
||||
type: ['string', 'null']
|
||||
format: date-time
|
||||
description: when the order will close or was closed
|
||||
boxfill:
|
||||
type: ['string', 'null']
|
||||
format: date-time
|
||||
description: when the order will enter or entered the boxfill phase
|
||||
pickup:
|
||||
type: ['string', 'null']
|
||||
format: date
|
||||
description: pickup date
|
||||
is_open:
|
||||
type: boolean
|
||||
description: if the order is currently open or not
|
||||
is_boxfill:
|
||||
type: boolean
|
||||
description: if the order is currently in the boxfill phase or not
|
||||
|
||||
Navigation:
|
||||
type: array
|
||||
items:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue