Chuyển đến nội dung chính
POST
https://api-oms.verolabs.co
/
api
/
v1
/
util
/
requests
/
{requestId}
/
approve
Approve a request (reviewer must differ from requester)
curl --request POST \
  --url https://api-oms.verolabs.co/api/v1/util/requests/{requestId}/approve \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "note": "<string>"
}
'
{
  "id": 123,
  "request_type": "<string>",
  "payload": {},
  "requested_by": "<string>",
  "reviewed_by": "<string>",
  "review_note": "<string>",
  "apply_error": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "reviewed_at": "2023-11-07T05:31:56Z",
  "applied_at": "2023-11-07T05:31:56Z"
}

Ủy quyền

Authorization
string
header
bắt buộc

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Tham số đường dẫn

requestId
string
bắt buộc

Workflow request identifier.

Nội dung

application/json

Optional reviewer note payload.

ReviewNote schema.

note
string

Optional review note for approve/reject.

Phản hồi

200 - application/json

OK

WorkflowRequest schema.

id
integer<int64>

Unique identifier for the record.

request_type
string

Workflow request type.

payload
object

Type-specific request payload.

status
enum<string>

Status value returned by the API.

Tùy chọn có sẵn:
PENDING,
APPROVED,
REJECTED,
CANCELLED,
APPLIED,
FAILED
requested_by
string

User that submitted the request.

reviewed_by
string

User that reviewed the request.

review_note
string

Reviewer note.

apply_error
string

Error captured while applying the approved request.

created_at
string<date-time>

Timestamp when the record was created.

reviewed_at
string<date-time>

Timestamp when the request was reviewed.

applied_at
string<date-time>

Timestamp when the approved request was applied.