Admin api contests

Update contested order

PATCH
/api/admin/v2/contests/{orderId}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

orderId*integer

Request Body

application/json

reviewedTotalPrice*number

It will calculate the reviewedTotalPrice based on contested items if there is no reviewedTotalPrice in request.

By default, reviewedTotalPrice takes precedence over cart mutator totalPrice. Cart Mutator implementation should respect and properly handle adjusted reviewedTotalPrice.

Defaultnull
items*array<>

Response Body

application/json

application/json

curl -X PATCH "https://oasis-api.public.sandbox.oasis.aifi.com/api/admin/v2/contests/0" \  -H "Content-Type: application/json" \  -d '{    "reviewedTotalPrice": null,    "items": [      {        "id": 0,        "productId": 0,        "reviewedQuantity": 0      }    ]  }'
{
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "deletedAt": "2019-08-24T14:15:22Z",
  "id": 0,
  "orderId": "string",
  "orderVersion": 0,
  "sessionId": "string",
  "message": "string",
  "fromOperator": true,
  "status": "contested",
  "contestedTotalPrice": "120.00",
  "reviewedTotalPrice": "120.00",
  "originalTotalPrice": "123.45",
  "items": [
    {
      "id": 0,
      "productId": 0,
      "name": "string",
      "price": "string",
      "thumbnail": "string",
      "productSnapshot": {
        "name": "string",
        "price": "string",
        "barcode": "string",
        "category": "string",
        "thumbnail": "string",
        "weight": 0,
        "sku": "string",
        "externalId": "string",
        "taxCode": "string",
        "id": 0,
        "productId": 0,
        "createdAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z"
      },
      "originalQuantity": 0,
      "contestedQuantity": 0,
      "reviewedQuantity": 0
    }
  ],
  "transaction": {
    "paymentTransactionId": "string",
    "refunded": true,
    "tryRefundTimes": 0,
    "paymentFailed": true
  }
}
Empty
Empty
Empty
{
  "message": "Invalid request body",
  "type": "E_INVALID_BODY",
  "errors": [
    {
      "error": "\"email\" is required",
      "rule": "any.required",
      "field": "\"email\""
    }
  ]
}

How is this guide?

AiFI AI Chat

Beta

Powered by AiFi

Ask docs or API questions to get grounded answers.