Order Items

Cancel an order item

Changed on

Cancel an order item and refund its full line price to team credits, or to card with the rest to credits when the card cannot return all of it. Orders without a team can only be refunded to card.

patch/admin/order-items/{order_item_id}/cancel

Request

  • Base URL: https://api.presscart.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.presscart.com/admin/order-items/{order_item_id}/cancel
  • Auth: HTTP bearer

Path parameters

order_item_idstring uuid required
Example:b8ffe503-d38d-42a2-9e62-74d079de5cd5

Request body

refund_method'CARD' | 'CREDITS'

CARD returns what the Stripe payments of the order can still return and the rest to team credits; CREDITS (the default) returns everything to team credits.

Example request

{
  "refund_method": "CARD"
}

Response

Order item cancelled successfully

card_refund_idsstring[] required

The card refunds created; they are sent to Stripe once the cancellation commits.

Example response

{
  "credit": {
    "amount": 280,
    "type": "CREDIT",
    "reason": "referral_commission",
    "notes": "Commission for article #123",
    "entity": "order_items",
    "entity_id": "123e4567-e89b-12d3-a456-426614174000"
  },
  "order_item": {
    "commission_amount": 22.105000000000004,
    "commission_status": "PENDING"
  }
}

Changes

    • info

      added optional request body

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the required property to the response with the status