A Port Order can only be cancelled while in a ‘Pending’ state or a 'Rejected' state. If it is in a different state (Processing, Submitted, Accepted, Review), you must open a ticket with Flowroute support. If a port order is in the status 'Pending', and you issue a cancel order request, the new status becomes 'Cancelled'. If a port order is in the status 'Rejected', and you issue a cancel order request, the new status becomes 'Abandoned'.
Method
PATCH portorders/:portorder_idBody Parameters
-
data
object RequiredPort order object to be submitted which is composed of type and attributes.
-
attributes
objectRequiredObject composed of the following attributes of a port order.
Attributes
-
status
stringRequiredThis value must be set to 'cancelled'.
Response Format
On success, the HTTP status code in the response header is 200 OK and the response body contains status information of the specified Port Order.
-
data
objectData object for the port order status.
-
id
integerPort order ID.
-
type
stringThis will always be portorder.
-
attributes
objectObject composed of the following port order status attributes.
-
status
stringThe status of the specified Port Order.
-
status_udpated_at
datetimeThe timestamp when the order was last updated.
-
Example Request
PATCH /v2/portorders/41351/status HTTP/1.1
Content-Type: application/json
Accept: application/json
"data": {
"type": "portorder",
"attributes": {
"status": "cancelled"
}
}
Example Request
curl -X PATCH https://api.flowroute.com/v2/portorders/41352/status -u accessKey:secretKey -d '{"data":{"attributes":{"status": "cancelled"}}}' -H 'Content-Type':'application/json'
Response Format
200 OK
{
"data": {
"attributes": {
"status": "cancelled",
"status_updated_at": "2018-07-31T21:34:17Z"
},
"id": "41351",
"type": "portorder"
}
}