Skip to main content

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 NameDescriptionTypeAdditional Information
orderIdThe 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 NameDescriptionTypeAdditional Information
refNoThe client's own unique reference number for the order.stringNullable. Min 1, Max 14 characters.
phoneNumberThe applicant's new mobile number.stringNullable. If supplied, a new invitation SMS will be sent.
amountThe new current amount of the order.doubleNullable. Cannot exceed originalAmount or approvedAmount. Non-decimal.
selectableCampaignsA list of campaign IDs the applicant can choose from.array of integerNullable.
orderInfoCustom merchant-specific data.ObjectNullable. 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 CodeDescription
400 Bad RequestThe 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 UnauthorizedAuthentication failure (e.g., missing or invalid API key/credentials).
404 Not FoundThe specified orderId does not exist.