Flype Order API
  1. Shipments
  • Flype Order API
    • Introduction
    • Shipments
      • Rates
        POST
      • Create Bulk Orders
        POST
      • All Shipments
        POST
      • Shipments Count
        GET
      • Shipment Details
        GET
      • Shipment Last Status
        GET
      • Cancel Shipment
        POST
      • Get Shipping Label
        GET
    • Webhook
      • Webhook: Shipment status updates (Flype → Your Server)
    • Locations
      • Upsert Pickup Location
      • Get Saved Pickup Locations
      • Fetch Pickup Location Details
    • Schemas
      • ApiStatus
      • ErrorResponse
      • ShipmentsCountResponse
      • AllShipmentsRequest
      • ShipmentSummary
      • AllShipmentsResponse
      • BulkOrderRequest
      • BulkOrderResponse
      • SchedulePickupRequest
      • SchedulePickupResponse
      • City
      • GetCitiesResponse
      • ShipmentDetailsResponse
      • ShipmentLastStatusResponse
      • CancelShipmentResponse
      • LabelResponse
      • Country
      • CountriesResponse
      • ShipmentStatusWebhook
      • PlaceBulkItem
      • SuccessMessageResponse
      • PlaceBulkAddress
      • BooleanDataResponse
      • PlaceBulkPickupLocation
      • ShipmentAddress
      • PlaceBulkShipment
      • ShipmentRecipient
      • PlaceBulkAcceptedOrder
      • ShipmentRetailerAddress
      • PlaceBulkDeniedOrder
      • ShipmentRetailer
      • BulkOrderResponseData
      • ShipmentDriver
      • ShipmentStatusHistoryEntry
      • DeliverySettings
      • DropOffDetails
      • AllShipmentsItem
      • CitiesResponse
      • AirwayBillResponse
      • WebhookShipmentStatusUpdate
      • WebhookAckResponse
      • PlaceBulkDeliveryAddress
      • PlaceBulkRequest
  1. Shipments

Cancel Shipment

POST
/order/{trackingNumber}/cancel

Cancel Shipment - Cancel an existing shipment#

Use this endpoint to cancel an existing shipment using its Flype trackingNumber.
A shipment can only be cancelled before it has been picked up or entered the active delivery flow.

When to use this endpoint#

  • When an order is cancelled by the customer or merchant.
  • When the shipment should no longer be collected or delivered.

Important notes#

  • This endpoint changes the shipment state.
  • Shipments that have already been picked up may not be cancellable.
  • If the shipment cannot be cancelled due to its current state, the API should return a conflict response.

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Path Params

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/order/TKTN0M4DVCJ8/cancel' \
--header 'Authorization: Bearer <token>'

Responses

🟢200
application/json
Cancel response.
Bodyapplication/json

Examples
{
    "status": "success",
    "data": true
}
🟠401
🟠404
🔴500
Previous
Shipment Last Status
Next
Get Shipping Label
Built with