Cancel a purchase order
POST/purchase-orders/:code/cancel
Transitions a purchase order to CANCELED status with a required reason. Accountants may cancel any purchase order before it is completed; everyone else only their own, and once an active credit card exists for it and/or it has been ordered the request must confirm the card was not used.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 429
- 500
Successfully canceled purchase order
Bad request - code missing or invalid status
Unauthorized
Not the purchase request owner and not an accountant
Purchase order not found
Purchase order is completed or its status has no cancel transition
Card-not-used confirmation missing
Too many requests - rate limited by the API firewall; wait out the Retry-After delay before retrying
Response Headers
Retry-After
Delay in seconds a client must wait before retrying the request
Internal server error