Skip to main content

Search Orders

SearchOrders

This method searches and returns orders based on the filter information provided. The StartIndex and EndIndex are used for paging, while the sorting structure describes how the results should be sorted.


Input

SearchOrdersRequest

FieldRTypeDescription
StartIndex*IntegerIndex of the first result.
EndIndex*IntegerIndex of the last result.
SearchOrderFilter*SearchOrderFilterFilter for narrowing down the search result.
SearchOrderSorting*SearchOrderSortingSpecifies how to sort the data.

Output

SearchOrdersResponse

FieldRTypeDescription
OrderListItems*Array of OrderListItemList of search results.
ResultCount*IntegerNumber of hits after a search.

Structures

SearchOrderFilter

FieldRTypeDescription
AcceptedDeliveryStatus-List of OrderDeliveryStatusSee OrderDeliveryStatus
AcceptedOrderStatus-List of OrderStatusSee OrderStatus
TextMatch-StringFree text match on order ID, birth date, etc.
StartDate-DateTimeThe earliest creation date/time of the order searched for.
EndDate-DateTimeThe latest creation date/time of the order searched for.
TextMatchType-TextMatchTypeSpecifies the property to use for the free text search. If not provided, AllFields will be searched.

SearchOrderSorting

FieldRTypeDescription
SortDirection-SortDirectionWhich way to sort: Ascending or Descending.
SortOrderProperty-SortOrderPropertyWhich field to sort on.

OrderListItem

FieldRTypeDescription
ClientOrderId-String(30)Order number from the client's ordersystem.
CreatedDate-DateTimeDate when the order was first created.
Status-(String) OrderStatusSee OrderStatus
DeliveryStatus-(String) OrderDeliveryStatusSee OrderDeliveryStatus
Amount-Decimal(11,2)The order amount.
OrderType-(String) OrderTypeSee OrderType
NationalIdNumber-StringUnique identifier for customers (e.g., Personnummer & organisationsnummer in Sweden). For some countries, birthdate is returned instead. Not returned for Finnish clients.
SveaOrderId-Long(10)Unique ID for the created order. Used for any further order webservice requests.
ClientId-Long(7)ID that identifies a client in the Svea Payments system.
CreditApproved-BooleanIndicates if credit was approved by Svea Payments.
CreditRejectionMessage-String(70)Explanation if credit was rejected by Svea Payments.
ChangeDate-Nullable DateTimeDate when order status was changed.
CancelledDate-Nullable DateTimeDate when order was cancelled.
CustomerName-StringName on the customer associated with the order.
CustomerType-CustomerTypeSee CustomerType
CustomerCountryCode-String(2)A country code that defines where the customer is residing.

Enumerations

SortDirection

ValueDescription
AscendingSorts values in increasing order.
DescendingSorts values in decreasing order.

SortOrderProperty

ValueDescription
CreatedDateSorts by the date the order was created.
RemainingAmountSorts by the remaining order amount.
ClientOrderIdSorts by the client’s order identifier.
CreditApprovedSorts by credit approval status.
SveaOrderIdSorts by the Svea order identifier.
CustomerNameSorts by the name of the customer.
StatusSorts by the current status of the order.
NationalIdNumberSorts by the national ID number.
OrderTypeSorts by the type of order.

TextMatchType

ValueDescription
AllFieldsSearches across all available fields.
SveaOrderIdSearches by Svea order identifier.
ClientOrderNumberSearches by client order number.
NationalIdNumberSearches by national ID number.