Update Check First

Order API v1
POST*base*/check-first
Authentication:API key

This will update the status of a check-first warehouse on an order.

Warning

Updating a check first for an order is irreversible. Once an order has been accepted or rejected, it can no longer be changed.

Parameters

orderNumber

int
required
Order ID to update the Check first.

warehouseId

int
required
Warehouse ID associated with the Check first order.

accepted

boolean
required
Whether to accept or reject the Check First warehouse. true to accept, false to reject.

Request example

1
2
3
4
5
6
7
8
POST <base>/check-first HTTP/1.1
Content-type: application/json

{
  "orderNumber": 123,
  "warehouseId": 321,
  "accepted": true
}

Response

200 Content-type: application/json

status

string
required
ok if success, else no.

msg

string|object
optional
If status returns no, this value should send back a message why it failed.

Response example

1
2
3
4
5
6
HTTP/1.1 200 OK
Content-type: application/json

{
  "status": "ok"
}

Error examples

1
2
3
4
5
6
7
8
{
  "status": "no",
  "msg": {
     "orderNumber": "invalid value",
     "warehouseId": "required",
     "accepted": "invalid value"
  }
}
1
2
3
4
{
  "msg": "order does not exist",
  "status": "no",
}
1
2
3
4
{
  "msg": "failed to allocate stock",
  "status": "no",
}