Get Orders
GetOrders
This method is used to fetch specific orders from the Svea Payments system and their order rows.
Input
GetOrdersRequest
| Field | R | Type | Description |
|---|---|---|---|
| OrdersToRetrieve | * | Collection of GetOrderInformation | Information about the orders to retrieve |
Output
GetOrdersResponse
| Field | R | Type | Description |
|---|---|---|---|
| Orders | - | Collection of Order | The orders that were requested |
Structures
GetOrderInformation
| Field | R | Type | Description |
|---|---|---|---|
| SveaOrderId | * | Long(10) | Unique ID for the created order. Used for any further order webservice requests. |
| OrderType | - | OrderType | See OrderType. Required for Legacy, ignored for EU-clients. |
| ClientId | * | Long(7) | ID that identifies a client in the Svea Payments system. |
Order
| Field | U | R | Type | Description |
|---|---|---|---|---|
| ClientOrderId | - | - | String(30) | Order number from client’s ordersystem. |
| SveaOrderId | * | * | Long(10) | Unique ID for the created order. Used for any further order webservice requests. |
| OrderDeliveryStatus | - | * | (String)OrderDeliveryStatus | See OrderDeliveryStatus |
| OrderStatus | - | * | (String)OrderStatus | See OrderStatus |
| OrderType | - | * | (String)OrderType | See OrderType |
| CreatedDate | - | * | DateTime | Date order was first created. |
| Customer | - | * | CustomerIdentity | Shipping address. |
| CustomerId | - | - | Nullable<Long> | Customer ID created by Svea Payments system. |
| CustomerReference | - | - | String(32) | Customer Reference. (Gets printed on the invoice.) |
| ChangeDate | - | - | DateTime | Date when order status was changed, e.g., when order was delivered. |
| Currency | - | * | String(3) | Country currency. |
| SveaWillBuy | - | * | Boolean | Describes whether Svea Payments will buy the order or just administrate it. |
| Notes | - | * | String(200) | Text on order created by client. |
| ClientId | * | * | Long(7) | ID that identifies a client in the Svea Payments system. |
| PaymentPlanDetails | - | - | PaymentPlanDetails | Only applicable for payment plan order type. |
| AccountCreditDetails | - | - | AccountCreditDetails | Only applicable for account credit order type. |
| IsPossibleToAdminister | - | * | Boolean | |
| CreditReportStatus | - | - | CreditReportStatus | Tells if the order is approved or not. Not sent if no credit decision has been made (e.g., manual administration). |
| OrderRows | - | * | Collection of NumberedOrderRow | Order rows for the order. |
| IsPossibleToCancel | - | * | Boolean | Tells if the order can be cancelled. |
| PendingReasons | - | - | Collection of PendingReasons | Reasons why the order is pending. |
CustomerIdentity
| Field | U | R | Type | Description |
|---|---|---|---|---|
| NationalIdNumber | * | - | String | Field for entering unique identifiers for customers in certain countries. (Example: Personnummer & organisationsnummer in Sweden). Will not be returned for Finnish clients. |
| - | - | String | A valid email address of the customer. | |
| PhoneNumber | - | - | String | Customer’s phone number. |
| IpAddress | - | - | String | Customer’s IP-address. |
| FullName | - | * | String | Full name of the customer. Either first name + family name or company name. |
| Street | - | * | String | Customer’s street address. |
| CoAddress | - | - | String | Customer co-address. |
| ZipCode | - | * | String | The complete zip code of the Customer. |
| HouseNumber | - | - | String | House number (only applicable in certain countries). |
| Locality | - | * | String | Customer’s town of residence. |
| CountryCode | - | * | String (2) | A country code which defines where the customer is residing. |
| CustomerType | - | * | CustomerType | See CustomerType. |
| IndividualIdentity | - | - | IndividualIdentity | Only if the CustomerType is Individual. |
| CompanyIdentity | - | - | CompanyIdentity | Only if the CustomerType is Company. |
AccountCreditDetails
| Field | R | Type | Description |
|---|---|---|---|
| CampaignCode | - | Decimal | The campaign code for the account credit. |
PaymentPlanDetails
| Field | R | Type | Description |
|---|---|---|---|
| ContractNumber | * | Nullable<Long> | Contract number of a specific contract. |
| ContractLengthMonths | - | Integer | |
| CampaignCode | - | Decimal | The campaign code. |
CreditReportStatus
| Field | R | Type | Description |
|---|---|---|---|
| CreationDate | * | DateTime | Date of order credit decision. |
| Accepted | * | Boolean | True if credit approval passed. |
NumberedOrderRow
| Field | U | R | Type | Description |
|---|---|---|---|---|
| ArticleNumber | - | - | String(10) | Article number of the product. |
| Description | - | - | String(40) | Description of the product. |
| DiscountPercent | - | * | Decimal(3,0) | Discount in percent (0–100). |
| NumberOfUnits | - | * | Decimal(7,2) | |
| PriceIncludingVat | - | - | Nullable<Boolean> | If true, PricePerUnit will be considered as including VAT. Recommended to be true if the customer is an individual and false if company. |
| PricePerUnit | - | * | Decimal(18,2) | Price per unit of product. (Excluding VAT if flag PriceIncludingVat is not set to true) |
| RowType | - | - | RowType | See RowType. |
| Unit | - | - | String(3) | Short description of unit (e.g., "ea."). |
| VatPercent | - | * | Decimal(2,0) | Percent of VAT (0–99). |
| CreditInvoiceId | * | - | Nullable<Long> | Reference to invoice to credit. |
| InvoiceId | * | - | Nullable<Long> | ID to invoice if order has been delivered. |
| RowNumber | - | * | Long(3) | |
| Status | - | - | (String)OrderRowStatus | See OrderRowStatus. |
| DiscountAmount | - | - | Nullable<Decimal(18,2)> | The discount amount. If set, the amount will be deducted from the amount to pay. |
| DiscountAmountIncludingVat | - | - | Nullable<Boolean> | If true, the discount amount will be deducted after VAT is added (use for individual end-customers). If false, deducted before VAT is added (use for business end-customers). |
Note: The fields must be set in the specified order. Optional fields in a different order may not be used by the service.
PendingReason
The following table describes the structure for PendingReason.
PendingReason
| Field | R | Type | Description |
|---|---|---|---|
| PendingType | * | (String) PendingType | See PendingType. |
| CreatedDate | * | String(10) | Date when the reason was created. |
Enumerations
OrderType
| Value | Description |
|---|---|
| Invoice | - |
| PaymentPlan | - |
| AccountCredit | - |
OrderDeliveryStatus
| Value | Description |
|---|---|
| Created | - |
| PartiallyDelivered | - |
| Delivered | - |
| Cancelled | - |
OrderStatus
| Value | Description |
|---|---|
| Created | - |
| Pending | - |
| Active | - |
| Denied | - |
| Closed | - |
| Error | - |
OrderRowStatus
| Value | Description |
|---|---|
| NotDelivered | - |
| Delivered | - |
| Cancelled | - |
CustomerType
| Value | Description |
|---|---|
| Individual | - |
| Company | - |
RowType
| Value | Description |
|---|---|
| AdjustmentRow | Deprecated |
| GiftCard | Deprecated |
| InvoiceFee | Used to specify the type of fee associated with an invoice payment. Required if Invoice fee is applied. |