Cancel a Port Order

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_id

Body Parameters

  • data
    object Required

    Port order object to be submitted which is composed of type and attributes.

  • attributes
    objectRequired

    Object composed of the following attributes of a port order.

Attributes

  • status
    stringRequired

    This 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
    object

    Data object for the port order status.

  • id
    integer

    Port order ID.

  • type
    string

    This will always be portorder.

  • attributes
    object

    Object composed of the following port order status attributes.

    • status
      string

      The status of the specified Port Order.

    • status_udpated_at
      datetime

      The 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"
  }
}