Home > API > Order Management > Update order

Update order

Change the contents of an Authorized but not Captured order. Use this call to add or remove items in an existing Order, without creating a new orderNumber.
You must provide the entire body of the query, in the same format as Authorize, including all Order Items. (If you added an item, Update Order must contain previously Authorized items as well. If you removed an item, Update Order must contain the new full list of Order Items.)
If the TotalGrossAmount has increased compared to the Authorize call for this orderNumber, a new Risk Check will be made for the additional amount. If the additional Risk Check returns a rejection, the original Authorize will remain valid.

PATH:

/api/v3/orders/{orderNumber}/updateOrder

PATH PARAMETERS:

orderNumber
required

string

Order number

REQUEST BODY SCHEMA:

updateOrderSummary
required

updateOrderSummary object

Update order

totalNetAmount
required

number

Total net amount of order.

totalGrossAmount
required

number

Total gross amount of order. Must match the grossUnitPrice * quantity of order items

currency

string

Enum: EUR NOK SEK DKK CHF

Order currency. If not set it will be taken from client's source system currency setting

merchantImageUrl

string <= 2048 characters

Image URL for the merchants brand. This image is shown at the top of the order page in MyAfterPay

items

array of items

Array of order items. Maximum allowed 200 items.

Array () [
productId
required

string <= 100 characters

Merchant Product identification number

groupId

string <= 50 characters

Item group ID. The group this item belongs to. Provided by the merchant

description
required

string

Product name. For example "Black music player 64GB". Everything over 255 characters will be truncated

type

string

Enum: PhysicalArticle DigitalArticle GiftCard Discount ShippingFee Surcharge Info

Order item type

netUnitPrice
required

number

Net unit price

grossUnitPrice
required

number

Gross price per item

quantity
required

number

Quantity. Use of integer is strongly proposed. If you want to use decimal, please contact your integration manager.

vatCategory

string

Enum: HighCategory LowCategory NullCategory NoCategory MiddleCategory OtherCategory

VAT category

vatPercent
required

number

Tax percent

vatAmount
required

number

Tax amount per item

imageUrl

string <= 2048 characters

URL for the image of this product. It will be turned into a thumbnail and displayed in MyAfterPay, on the invoice line next to the order item. The linked image must be a rectangle or square, width between 100 pixels and 1280 pixels.

productUrl

string <= 2048 characters

URL to the product

marketPlaceSellerId

string <= 32 characters

ID of an individual seller on a marketplace

additionalInformation

string <= 4096 characters

Extended description of the order item.


]
yourReference

string <= 20 characters

Can be used by purchasing company if they would like to provide internal reference

ourReference

string <= 20 characters

Can be used by selling company if they would like to provide specific reference for purchasing company

RESPONSES:

200 OK

RESPONSE SCHEMA:

outcome

string

Enum: Accepted Pending Rejected NotEvaluated

Outcome

reservationId

string

Reservation ID

checkoutId

string

Checkout ID

riskCheckMessages

array of riskCheckMessages

Risk check messages

Array () [
type

string

Enum: BusinessError TechnicalError NotificationMessage

Message type

code

string <= 100 characters

Confirmation or error code

message

string <= 4096 characters

Message content

customerFacingMessage

string <= 4096 characters

Message to display to customer

actionCode

string

Enum: Unavailable AskConsumerToConfirm AskConsumerToReEnterData OfferSecurePaymentMethods RequiresSsn AskConsumerToIdentify

Possible next action to make

fieldReference

string <= 100 characters

Reference to field that caused an error


]
expirationDate

string

The date and time when this authorization will expire if you did not make a Capture call.If the deadline has passed, you must make a new Authorize call before Capturing this order.

400 Model validation failed.

RESPONSE SCHEMA:

Array () [
type

string

Enum: BusinessError TechnicalError NotificationMessage

Message type

code

string <= 100 characters

Confirmation or error code

message

string <= 4096 characters

Message content

customerFacingMessage

string <= 4096 characters

Message to display to customer

actionCode

string

Enum: Unavailable AskConsumerToConfirm AskConsumerToReEnterData OfferSecurePaymentMethods RequiresSsn AskConsumerToIdentify

Possible next action to make

fieldReference

string <= 100 characters

Reference to field that caused an error

]
401 Authorization has been denied for this request.
500 Internal server error.

Path

post

/api/v3/orders/{orderNumber}/updateOrder

Request samples

  • {
    • "updateOrderSummary": { ...
      • "totalNetAmount": 1.00,
      • "totalGrossAmount": 1.00,
      • "currency": "string",
      • "merchantImageUrl": "string",
      • "items": [ ...
        • {
          • "productId": "string",
          • "groupId": "string",
          • "description": "string",
          • "type": "string",
          • "netUnitPrice": 1.00,
          • "grossUnitPrice": 1.00,
          • "quantity": 1.00,
          • "vatPercent": 1.00,
          • "vatAmount": 1.00,
          • "imageUrl": "string",
          • "productUrl": "string",
          • "marketPlaceSellerId": "string",
          • "additionalInformation": "string"
          }
        ]
      },
    • "yourReference": "string",
    • "ourReference": "string"
  • }

Response samples

200400
  • {
    • "outcome": "string",
    • "reservationId": "string",
    • "checkoutId": "string",
    • "riskCheckMessages": [ ...
      • {
        • "type": "string",
        • "code": "string",
        • "message": "string",
        • "customerFacingMessage": "string",
        • "actionCode": "string",
        • "fieldReference": "string"
        }
      ],
    • "expirationDate": "string"
    }
  • [
      ...
      • {
        • "type": "string",
        • "code": "string",
        • "message": "string",
        • "customerFacingMessage": "string",
        • "actionCode": "string",
        • "fieldReference": "string"
        }
    ]