Update Order
Purpose: Modifies one or more specified fields on an existing order. This operation follows free update semantics: only the supplied fields are updated; fields not included in the request body are ignored.
Endpoint Details
- HTTP Verb: PATCH
- URL Segment: /v3/order/{orderId}
- OpenAPI Spec: View in Swagger UI
- Notes: Allowed only if the order status is
Created. If a new phone number is submitted, a new invitation SMS will be sent.
Path Parameters
This method uses a parameter passed directly in the URL path.
| Field Name | Description | Type | Additional Information |
|---|---|---|---|
orderId | The unique ID of the order to update. | string ($uuid) | Required. |
Request Body (UpdateOrderDetailsRequest)
This method requires a JSON body containing one or more fields to update. Fields that are nullable (or not provided) will be ignored, but an empty string will be treated as an explicit value to overwrite the existing field.
| Field Name | Description | Type | Additional Information |
|---|---|---|---|
refNo | The client's own unique reference number for the order. | string | Nullable. Min 1, Max 14 characters. |
phoneNumber | The applicant's new mobile number. | string | Nullable. If supplied, a new invitation SMS will be sent. |
amount | The new current amount of the order. | double | Nullable. Cannot exceed originalAmount or approvedAmount. Non-decimal. |
selectableCampaigns | A list of campaign IDs the applicant can choose from. | array of integer | Nullable. |
orderInfo | Custom merchant-specific data. | Object | Nullable. See OrderInfo Schema |
Example Request
This example updates the amount and provides a new phoneNumber, which triggers a new SMS invitation.
{
"amount": 50000,
"phoneNumber": "+46709876543"
}
Successful Response (200 OK)
The API returns an OrderResponse object containing the updated Order.
For schema and examples, see the OrderResponse Schema page.
Error Responses
| Status Code | Description |
|---|---|
| 400 Bad Request | The request was invalid (e.g., attempting to update an order not in Created status, invalid phone number format, or amount exceeds the original/approved limits). |
| 401 Unauthorized | Authentication failure (e.g., missing or invalid API key/credentials). |
| 404 Not Found | The specified orderId does not exist. |