OrderResponse Schema
The OrderResponse is the main response type in the API. It contains a retrieved
Order entity.
| Field Name | Description | Type | Additional Information |
|---|---|---|---|
orderId | Svea's unique ID for the order. | string ($uuid) | Required. |
clientId | The unique ID of the client. | string ($uuid) | Required. |
refNo | The client's own unique reference number for the order. | string | Required. min: 1, max: 14. |
amount | The current amount of the order. | double | Required. Non-decimal (e.g., 55000.00 is 55 000 SEK). |
originalAmount | The initial amount the order was created for. | double | Required. Subsequent updates cannot exceed this. |
approvedAmount | The maximum approved amount after review. | double | Nullable. Updates cannot exceed this value once set. |
currency | The currency code. | string | Required. Example: SEK. |
applicant | The applicant's contact and ID information. | Object | Required. See schema for details. |
selectableCampaigns | The list of campaigns available to the applicant. | array of integers | Nullable. |
selectedCampaign | The ID of the campaign selected by the applicant. | integer | Nullable. |
callbackUrl | The configured URL for order status updates. | string | Required. |
createDate | Timestamp of the order creation. | string ($date-time) | Required. ISO 8601 format. |
status | The current status of the order. | string (enum) | Required. Values: Created, Initiated, Approved, Rejected, UnderReview, ReadyForCapture, CaptureRequested, Captured, Completed, Cancelled. |
orderInfo | Custom merchant-specific metadata. | Object | Nullable. See schema for details. |
country | The client's country. | string | Required. Automatically set. Example: SE. |
Applicant (Nested Object)
This object contains the identifying information for the customer.
| Field Name | Description | Type | Additional Information |
|---|---|---|---|
nationalId | The customer's national identification number. | string | Required. Example: 199601121768. |
phoneNumber | The customer's mobile number. | string | Required. Example: +46712345678. |
OrderInfo (Key-Value Map)
The orderInfo field is a free-form JSON object (often called a Map or Dictionary). It is
designed to hold arbitrary string keys and string values, providing a flexible way to
attach merchant-specific data to an order.
Structure:
{
"keyName1": "stringValue1",
"keyName2": "stringValue2"
}
Example JSON Body
This section shows the structure of a complete OrderResponse, including the
nested applicant object and the dynamic orderInfo map.
{
"orderId": "b8a8b8b8-c1c1-d2d2-e3e3-f4f4f4f4f4f4",
"clientId": "a1b1c1d1-e2f2-3g4h-5i6j-7k8l9m0n1o2p",
"refNo": "AB-10001",
"amount": 55000,
"originalAmount": 55000,
"approvedAmount": null,
"currency": "SEK",
"applicant": {
"nationalId": "199601121768",
"phoneNumber": "+46712345678"
},
"selectableCampaigns": [
100001,
100002
],
"selectedCampaign": null,
"callbackUrl": "https://www.yourdomain.com/callbacks",
"createDate": "2024-01-01T01:23:45.678Z",
"status": "Created",
"orderInfo": {
"usefulInfo": "This is an order",
"salesPersonId": "51"
},
"country": "SE"
}