Update an order

Changed on

Use /orders/:orderId endpoint to update an order.

**In order to complete payment, an order needs to have the paymentMethodId field completed. Provide it on order creation or in order update. ** Read more about paymentMethodId

Order can be also updated with couponCode - the offer price will be updated in response.

patch/orders/{orderId}

Request

  • Base URL
    https://mediastoreapi-sandbox.cleeng.com
  • URL
    https://mediastoreapi-sandbox.cleeng.com/orders/{orderId}
  • Auth
    API key in header Authorization

Path parameters

orderIdstring required

ID of Cleeng order

Request body

paymentMethodIdinteger

The identifier of Cleeng payment method settings. Provided by Cleeng Team

couponCodestring

Applied coupon code

buyAsAGiftboolean

Whether an order refers to gift purchase.

Response

200

Example response

{
  "responseData": {
    "success": true,
    "message": "Order created successfully",
    "order": {
      "id": 434946589,
      "customerId": 996028494,
      "customer": {
        "locale": "pl_PL",
        "email": "example@cleeng.com"
      },
      "publisherId": 120355559,
      "offerId": "S567921766_NL",
      "offer": {
        "title": "Monthly subscription (recurring) to customerName",
        "price": 18.3636,
        "currency": "EUR"
      },
      "totalPrice": 22.58,
      "priceBreakdown": {
        "offerPrice": 18.36,
        "discountedPrice": 18.36,
        "taxValue": 4.22
      },
      "taxRate": 0.23,
      "currency": "EUR",
      "country": "PL",
      "paymentMethodId": 607799465,
      "expirationDate": 1580307560,
      "requiredPaymentDetails": true
    }
  }
}

Changes

    • breaking

      the request property type changed from string to integer, and format from no format to int32

    • warning

      deleted the header request parameter Content-Type

    • warning

      removed the request property

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • info

      api operation id 31-update-an-order removed and replaced with update-an-order

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status