# Cancel purchase order

This operation is used to cancel a purchase order request. A transaction reference identifier is required to post using this operation. A transaction reference identifier will be returned upon use of the operation. Store this identifier in your application and systems as applicable. This reference ID is available in the event a problem occurs with the associated request. Successful execution of this method will cancel an open Purchase Order in Wineshipping's system and will return a transaction reference identifier. *Note: that Purchase Orders can only be canceled and are considered 'Open' as long as work has not been started.*

Endpoint: POST /api/InventoryMovement/CancelPurchaseOrder
Version: 3.1.4

## Request fields (application/json):

  - `Authentication` (object, required)
    Credentials are required for all API operations.

  - `Authentication.UserKey` (string, required)
    Example: C445598CB576468EA35FBB22C55584EF

  - `Authentication.Password` (string, required)
    Example: AF63FDAC1E704DC1AC9460F669ABF107

  - `Authentication.CustomerNo` (string, required)
    Example: 10703

  - `CustomerReferenceNo` (string, required)

## Response 200:

  - `200` (unknown)
    The purchase order cancellation request has succeeded.

## Response 300:

  - `300` (unknown)
    There are more than one purchase order for the requested customer reference number.

## Response 400:

  - `400` (unknown)
    Invalid Input Data

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 403:

  - `403` (unknown)
    The requested purchase order has some or all quantities in a arrived, registered, or received state. Cancellation is not allowed.

## Response 404:

  - `404` (unknown)
    Not Found - no active PO with Customer Reference Number

## Response 429:

  - `429` (unknown)
    Too Many Requests [... see rate-limit details](https://wineshipping-api.redocly.app/../../../../docs/infrastructure#rate-limits--quotas)

## Response 500:

  - `500` (unknown)
    Internal Server Error

