Admin api orders
Update order by id
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Path Parameters
orderId*integer
Request Body
application/json
transactionId?integer
Id of shopping transaction
paymentTransaction?
status?string
The order status should be derived from payment status when paymentTransaction.paymentStatus is provided
Value in
"draft" | "paid" | "unpaid" | "completed_so_far" | "paymentProcessing" | "contested" | "reviewed"products?array<>
externalStatus?string
Value in
"ok" | "failedObtainingPrice" | "failedSendingWebhook"externalId?string
Client defined order identifiers
Response Body
application/json
application/json
curl -X PATCH "https://oasis-api.public.sandbox.oasis.aifi.com/api/admin/v2/orders/0" \ -H "Content-Type: application/json" \ -d '{}'{
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"id": 0,
"version": 0,
"isLatest": 0,
"customerId": "11",
"storeId": 1,
"status": "draft",
"transactionId": 0,
"externalId": "string",
"externalStatus": "ok",
"subtotalPrice": "1.80",
"totalPrice": "2.15",
"totalTax": "0.35",
"paidAt": "2019-08-24T14:15:22Z",
"notificationSentAt": "2019-08-24T14:15:22Z",
"extraText": "",
"completedAt": "2019-08-24T14:15:22Z",
"draftCreatedAt": "2019-08-24T14:15:22Z",
"sessionId": "string",
"transaction": {
"paymentTransactionId": "string",
"refunded": true,
"tryRefundTimes": 0,
"paymentFailed": true
},
"paymentTransaction": {
"paymentTransactionId": "string",
"refunded": true,
"tryRefundTimes": 0,
"paymentStatus": "success"
},
"products": [
{
"name": "string",
"price": "string",
"barcode": "string",
"category": "string",
"thumbnail": "string",
"weight": 0,
"sku": "string",
"externalId": "string",
"taxCode": "string",
"id": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"productId": "string",
"isExternallyAdded": true,
"orderProductExternalId": "string",
"quantity": 0,
"subtotalPrice": "1.80",
"totalPrice": "2.15",
"totalTax": "0.35",
"taxRates": "Tax breakdown for this lineitem"
}
],
"lineItems": [
{
"isExternallyAdded": true,
"quantity": 0,
"subtotalPrice": "1.80",
"totalPrice": "2.15",
"totalTax": "0.35",
"taxRates": "Tax breakdown for this lineitem",
"price": "10.00",
"externalId": "string",
"status": "ORIGINAL",
"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"
}
}
],
"vendorMetadata": {
"PaymentProvider": [
{
"type": "DISCOUNT",
"value": "Applied discount 5%"
}
]
},
"session": {
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"id": 0,
"customerId": 0,
"code": "c69bb289-1190-4156-b9f6-bfb7f61e85db",
"codeFirstSuccesfullyScannedAt": "2019-08-24T14:15:22Z",
"codeLastSuccesfullyScannedAt": "2019-08-24T14:15:22Z",
"customerFirstEnteredAt": "2019-08-24T14:15:22Z",
"customerLastEnteredAt": "2019-08-24T14:15:22Z",
"customerFirstExitedAt": "2019-08-24T14:15:22Z",
"customerLastExitedAt": "2019-08-24T14:15:22Z",
"customerPaymentInstrumentId": 0,
"customerSatisfaction": 95,
"customerSatisfactionSubmitted": false,
"groupSize": 0,
"visitors": 0,
"locationId": "string",
"priority": 0,
"sessionToken": "d3a00526-1864-4f6e-bb2d-46e3ab7fa780",
"sessionId": "d3a00526-1864-4f6e-bb2d-46e3ab7fa780",
"referencedSessionId": null,
"status": "active",
"storeId": 0,
"storeIdScannableAt": 0,
"suspectedFraud": false,
"metadata": {
"events": [
{
"eventId": "6bdbfb2d-65b2-491c-bc97-c0ac73338476",
"metadata": {
"key": "value"
}
}
],
"exampleKey": "exampleValue"
},
"expiresAt": "2019-08-24T14:15:22Z"
}
}Empty
{
"message": "Invalid request body",
"type": "E_INVALID_BODY",
"errors": [
{
"error": "\"email\" is required",
"rule": "any.required",
"field": "\"email\""
}
]
}How is this guide?