Bug 27947: Add cancellation reason to article request
[koha.git] / api / v1 / swagger / definitions / order.json
1 {
2     "type": "object",
3     "properties": {
4         "order_id": {
5             "type": "integer",
6             "description": "Internally assigned order identifier"
7         },
8         "biblio_id": {
9             "type": [
10                 "integer",
11                 "null"
12             ],
13             "description": "Identifier for the linked bibliographic record"
14         },
15         "created_by": {
16             "type": [
17                 "integer",
18                 "null"
19             ],
20             "description": "Interal patron identifier of the order line creator"
21         },
22         "entry_date": {
23             "type": [
24                 "string",
25                 "null"
26             ],
27             "format": "date",
28             "description": "Date the bib was added to the basket"
29         },
30         "quantity": {
31             "type": [
32                 "integer",
33                 "null"
34             ],
35             "description": "Ordered quantity"
36         },
37         "currency": {
38             "type": [
39                 "string",
40                 "null"
41             ],
42             "description": "Currency used for the purchase"
43         },
44         "list_price": {
45             "type": [
46                 "number",
47                 "null"
48             ],
49             "description": "Vendor price for the line item"
50         },
51         "replacement_price": {
52             "type": [
53                 "number",
54                 "null"
55             ],
56             "description": "Replacement cost for this item"
57         },
58         "date_received": {
59             "type": [
60                 "string",
61                 "null"
62             ],
63             "format": "date",
64             "description": "Date the order was received"
65         },
66         "invoice_id": {
67             "type": [
68                 "integer",
69                 "null"
70             ],
71             "description": "Id of the order invoice"
72         },
73         "shipping_cost": {
74             "type": [
75                 "number",
76                 "null"
77             ],
78             "description": "Shipping cost"
79         },
80         "unit_price": {
81             "type": [
82                 "number",
83                 "null"
84             ],
85             "description": "The actual cost entered when receiving this line item"
86         },
87         "unit_price_tax_excluded": {
88             "type": [
89                 "number",
90                 "null"
91             ],
92             "description": "Unit price excluding tax (on receiving)"
93         },
94         "unit_price_tax_included": {
95             "type": [
96                 "number",
97                 "null"
98             ],
99             "description": "Unit price including tax (on receiving)"
100         },
101         "quantity_received": {
102             "type": "integer",
103             "description": "Quantity received so far"
104         },
105         "cancellation_date": {
106             "type": [
107                 "string",
108                 "null"
109             ],
110             "format": "date",
111             "description": "Date the line item was deleted"
112         },
113         "cancellation_reason": {
114             "type": [
115                 "string",
116                 "null"
117             ],
118             "description": "Reason of cancellation"
119         },
120         "internal_note": {
121             "type": [
122                 "string",
123                 "null"
124             ],
125             "description": "Notes related to this order line, made for staff"
126         },
127         "vendor_note": {
128             "type": [
129                 "string",
130                 "null"
131             ],
132             "description": "Notes related to this order line, made for vendor"
133         },
134         "basket_id": {
135             "type": [
136                 "integer",
137                 "null"
138             ],
139             "description": "Basket this order is linked to"
140         },
141         "timestamp": {
142             "type": "string",
143             "format": "date-time",
144             "description": "Date and time this order line was last modified"
145         },
146         "rrp": {
147             "type": [
148                 "number",
149                 "null"
150             ],
151             "description": "Retail cost for this item"
152         },
153         "rrp_tax_excluded": {
154             "type": [
155                 "number",
156                 "null"
157             ],
158             "description": "Replacement cost for this item (tax excluded)"
159         },
160         "rrp_tax_included": {
161             "type": [
162                 "number",
163                 "null"
164             ],
165             "description": "Replacement cost for this item (tax included)"
166         },
167         "ecost": {
168             "type": [
169                 "number",
170                 "null"
171             ],
172             "description": "Effective cost"
173         },
174         "ecost_tax_excluded": {
175             "type": [
176                 "number",
177                 "null"
178             ],
179             "description": "Effective cost (tax excluded)"
180         },
181         "ecost_tax_included": {
182             "type": [
183                 "number",
184                 "null"
185             ],
186             "description": "Effective cost (tax included)"
187         },
188         "tax_rate_on_ordering": {
189             "type": [
190                 "number",
191                 "null"
192             ],
193             "description": "Tax rate on ordering (%)"
194         },
195         "tax_rate_on_receiving": {
196             "type": [
197                 "number",
198                 "null"
199             ],
200             "description": "Tax rate on receiving (%)"
201         },
202         "tax_value_on_ordering": {
203             "type": [
204                 "number",
205                 "null"
206             ],
207             "description": "Tax value on ordering"
208         },
209         "tax_value_on_receiving": {
210             "type": [
211                 "number",
212                 "null"
213             ],
214             "description": "Tax value on receiving"
215         },
216         "discount_rate": {
217             "type": [
218                 "number",
219                 "null"
220             ],
221             "description": "Discount rate"
222         },
223         "fund_id": {
224             "type": "integer",
225             "description": "Internal identifier for the fund this order goes against"
226         },
227         "statistics_1": {
228             "type": [
229                 "string",
230                 "null"
231             ],
232             "description": "Statistical field"
233         },
234         "statistics_2": {
235             "type": [
236                 "string",
237                 "null"
238             ],
239             "description": "Statistical field (2)"
240         },
241         "statistics_1_authcat": {
242             "type": [
243                 "string",
244                 "null"
245             ],
246             "description": "Statistical category for this order"
247         },
248         "statistics_2_authcat": {
249             "type": [
250                 "string",
251                 "null"
252             ],
253             "description": "Statistical category for this order (2)"
254         },
255         "uncertain_price": {
256             "type": "boolean",
257             "description": "If this price was uncertain"
258         },
259         "claims_count": {
260             "type": "integer",
261             "description": "Generated claim letters count"
262         },
263         "last_claim_date": {
264             "type": [
265                 "string",
266                 "null"
267             ],
268             "format": "date",
269             "description": "Last date a claim letter was generated"
270         },
271         "subscription_id": {
272             "type": [
273                 "integer",
274                 "null"
275             ],
276             "description": "Subscription ID linking the order to a subscription"
277         },
278         "parent_order_id": {
279             "type": [
280                 "integer",
281                 "null"
282             ],
283             "description": "Order ID of parent order line if exists"
284         },
285         "status": {
286             "type": "string",
287             "enum": [
288                 "new",
289                 "ordered",
290                 "partial",
291                 "complete",
292                 "cancelled"
293             ],
294             "description": "The current order status"
295         },
296         "basket": {
297             "type": [
298                 "object",
299                 "null"
300             ]
301         },
302         "biblio": {
303             "type": [
304                 "object",
305                 "null"
306             ]
307         },
308         "current_item_level_holds_count": {
309             "type": "integer",
310             "description": "Current holds count for associated items"
311         },
312         "fund": {
313             "type": [
314                 "object",
315                 "null"
316             ]
317         },
318         "invoice": {
319             "type": [
320                 "object",
321                 "null"
322             ]
323         },
324         "items": {
325             "type": "array"
326         },
327         "subscription": {
328             "type": [
329                 "object",
330                 "null"
331             ]
332         }
333     },
334     "additionalProperties": false
335 }