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
Field | R | Type | Description |
---|---|---|---|
StartIndex | * | Integer | Index of the first result. |
EndIndex | * | Integer | Index of the last result. |
SearchOrderFilter | * | SearchOrderFilter | Filter for narrowing down the search result. |
SearchOrderSorting | * | SearchOrderSorting | Specifies how to sort the data. |
Output
SearchOrdersResponse
Field | R | Type | Description |
---|---|---|---|
OrderListItems | * | Array of OrderListItem | List of search results. |
ResultCount | * | Integer | Number of hits after a search. |
Structures
SearchOrderFilter
Field | R | Type | Description |
---|---|---|---|
AcceptedDeliveryStatus | - | List of OrderDeliveryStatus | See OrderDeliveryStatus |
AcceptedOrderStatus | - | List of OrderStatus | See OrderStatus |
TextMatch | - | String | Free text match on order ID, birth date, etc. |
StartDate | - | DateTime | The earliest creation date/time of the order searched for. |
EndDate | - | DateTime | The latest creation date/time of the order searched for. |
TextMatchType | - | TextMatchType | Specifies the property to use for the free text search. If not provided, AllFields will be searched. |
SearchOrderSorting
Field | R | Type | Description |
---|---|---|---|
SortDirection | - | SortDirection | Which way to sort: Ascending or Descending. |
SortOrderProperty | - | SortOrderProperty | Which field to sort on. |
OrderListItem
Field | R | Type | Description |
---|---|---|---|
ClientOrderId | - | String(30) | Order number from the client's ordersystem. |
CreatedDate | - | DateTime | Date when the order was first created. |
Status | - | (String) OrderStatus | See OrderStatus |
DeliveryStatus | - | (String) OrderDeliveryStatus | See OrderDeliveryStatus |
Amount | - | Decimal(11,2) | The order amount. |
OrderType | - | (String) OrderType | See OrderType |
NationalIdNumber | - | String | Unique 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 | - | Boolean | Indicates if credit was approved by Svea Payments. |
CreditRejectionMessage | - | String(70) | Explanation if credit was rejected by Svea Payments. |
ChangeDate | - | Nullable DateTime | Date when order status was changed. |
CancelledDate | - | Nullable DateTime | Date when order was cancelled. |
CustomerName | - | String | Name on the customer associated with the order. |
CustomerType | - | CustomerType | See CustomerType |
CustomerCountryCode | - | String(2) | A country code that defines where the customer is residing. |
Enumerations
SortDirection
Value | Description |
---|---|
Ascending | Sorts values in increasing order. |
Descending | Sorts values in decreasing order. |
SortOrderProperty
Value | Description |
---|---|
CreatedDate | Sorts by the date the order was created. |
RemainingAmount | Sorts by the remaining order amount. |
ClientOrderId | Sorts by the client’s order identifier. |
CreditApproved | Sorts by credit approval status. |
SveaOrderId | Sorts by the Svea order identifier. |
CustomerName | Sorts by the name of the customer. |
Status | Sorts by the current status of the order. |
NationalIdNumber | Sorts by the national ID number. |
OrderType | Sorts by the type of order. |
TextMatchType
Value | Description |
---|---|
AllFields | Searches across all available fields. |
SveaOrderId | Searches by Svea order identifier. |
ClientOrderNumber | Searches by client order number. |
NationalIdNumber | Searches by national ID number. |