-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmfm_to_wms_openapi_spec.yaml
162 lines (144 loc) · 4.7 KB
/
mfm_to_wms_openapi_spec.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
openapi: 3.0.3
info:
title: Magazino Generic REST Server
version: '1.0'
description: >-
This interface is used by MFM (client) to communicate to the WMS
(server). It is meant to be implemented by the customer and integrated with
the customer's WMS system. The interface enables an event-based
communication where the customer is directly informed about changes in the
warehouse, for example if a SOTO robot picked or placed an item.
## Request Status Updates
MFM is pushing RequestStatusUpdates as soon as there is a change to the
status of a Request. MFM expects an HTTP status code in response to check if
the update was received and booked in the WMS.
There are 3 possible RequestStates:
* `picked`: a robot picked the item from the source container and it is now
in the robot's backpack. At this moment, the WMS can remove this item from the
source container.
* `completed`: a robot placed the item in the target container. At this
moment, the WMS can add this item to the target container.
* `aborted`: an error happened during the execution of the request. At this
moment, the WMS can assign the request to a human.
paths:
/request_status_update:
post:
tags:
- wms
requestBody:
description: >-
A RequestStatus contains the status for the identified Request in the
identified Order.
The status can be:
1. `picked`
2. `completed`
3. `aborted`
content:
application/json:
examples:
Order completed:
value:
order_id: "ORDER_01"
request_id: "REQUEST_01"
status: "completed"
current_item_container: "CONTAINER_01"
timestamp: "2023-09-19T11:59:35.590Z"
comment: ""
custom_fields: {}
Order aborted:
value:
order_id: "ORDER_01"
request_id: "REQUEST_01"
status: "aborted"
current_item_container: "CONTAINER_01"
timestamp: "2023-09-19T11:59:35.590Z"
comment: "Order aborted. Reason: KLT not found in source compartment"
custom_fields: {}
schema:
type: array
items:
$ref: '#/components/schemas/RequestStatusUpdate'
description: List of RequestStatus
required: true
responses:
'200':
description: >-
Acknowledgement of the server that the RequestStatusUpdate was
received and accepted or rejected.
'400':
description: Bad Request
content:
text/plain:
schema:
type: string
example: illegal transaction
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
'500':
description: Internal Server Error
components:
schemas:
RequestState:
enum:
- picked
- completed
- aborted
type: string
RequestStatusUpdate:
description: Current status of a Request.
required:
- order_id
- request_id
- status
- current_item_container
- timestamp
type: object
properties:
order_id:
type: string
description: ID for order identification.
example: ORDER_01
request_id:
type: string
description: ID for request identification.
example: REQUEST_01
status:
allOf:
- $ref: '#/components/schemas/RequestState'
- description: |-
One of:
- picked
- completed
- aborted
- example: picked
current_item_container:
type: string
description: Name to identify the container.
example: CONTAINER_01
timestamp:
format: date-time
title: Timestamp
description: The time when the status update happened.
type: string
comment:
title: Comment
description: 'Reason in case the status is aborted.'
type: string
example: ""
custom_fields:
title: Custom Fields
type: object
description: |-
Extra fields sent with the order (the same as received in the
Order interface).
example:
is_announced: "true"
other_field: "1234"
headers: {}
responses: {}
parameters: {}
tags: []