Skip to main content

Get order

To retrieve details about a specific order using our management api, you need to perform a GET request to the orders endpoint while providing the order's id.

A recent change may not show up yet

Order updates are applied asynchronously, so a fetch straight after a write can return the old version.

  • If you have the action correlationId from a webhook, include it in the query. Walley returns the order only once that action has been applied.
  • Otherwise, wait up to 1 minute before fetching, and keep the read off your customer's critical path.
  • Retry 403 and 404 after at least 3 seconds. Right after a purchase, both usually mean the order is still syncing.

Asynchronous operations covers this in full.

GET /manage/orders/{{orderId}}?correlationId={{correlationId}} HTTP/1.1
Host: api.uat.walleydev.com // Test environment. Production uses a different hostname.
Content-Type: application/json
Authorization: Bearer {{accessToken}}

Data Model​

Request​

Request path​

PathRequiredExplanation
orderIdYesThe id of the order that is requested
correlationIdNoThe correlation ID of an action. If specified, the order is only returned if it was affected by this action, otherwise a 404 Not Found response is returned.

Request headers​

HeaderRequiredExplanation
AuthorizationYesSee Authentication for how to generate the Bearer token value

Response​

Possible responses​

Http status codeDescription
200The order is returned in data
401Token missing, expired, or invalid
403No permission for this store, or the order has not finished syncing
404Order not found, the order has not finished syncing, or the correlationId has not been applied yet

See Errors for what to do about each of these.

Response body from 200 OK​

This is the main structure of the response object:

{
"data": {},
"links": {},
"metaData": {}
}

response.data object follows the structure:

Example

{
"id": "853f3f82-ab12-47c3-9d97-af17009852cd",
"reference": "MX_220921_111434",
"paymentMethod": "Invoice",
"totalAmount": 2362.36,
"currency": "SEK",
"status": "Activated",
"salesSegment": "B2C",
"countryCode": "SE",
"productCode": "DI_001",
"placedAt": "2022-09-21T11:14:35.7900411+02:00",
"expiresAt": null,
"customer": {
/*...*/
},
"deliveryAddress": {
/*...*/
},
"invoiceAddress": {
/*...*/
},
"items": [
/*...*/
],
"invoices": [
/*...*/
]
}
PropertyExplanation
idThe id of the order
referenceThe order number/reference set by merchant at point of purchase
paymentMethodThe method used by the end customer to perform the Purchase. Invoice, Account, Installment, AdvanceInvoice, Swish, Amex, Dankort, Vipps, Card, MobilePay, BankTransfer, LoyalPay, VippsMobilePay, ApplePay
totalAmountThe total amount of the order excluding financial fees
currencyThe currency of the order
statusThe status of the entire order. NotActivated, Activated, PartActivated, Returned, Expired, OnHold, Closed
salesSegmentThe type of endcustomer that made the order, B2C, B2B
countryCodeThe country code of the market where the order was placed
productCodeThe product code used for the payment method
placedAtTimestamp in UTC of when the order was placed
expiresAtTimestamp in UTC of when the order expires if not activated
customerCustomer specific details. See Customer
deliveryAddressDelivery address. See Address
invoiceAddressInvoicing address. See Address
itemsAll items of the order See Items
invoicesList of invoices the end customer has been notified. See Invoice