Klarna Docs - Add shipping information to order

Add shipping information to order

Use the Order management API to add shipping information to an order and enable delivery tracking.

When you want to add shipping details to an order, you can send the shipping details after creating the order, as explained in this API call. This call can be used for a better customer experience when shipping information is available before capturing the order.

By adding the shipping details on order level, you make this information available to your customers so that they can keep track of the delivery.

To add the shipping information to an order, send a POST  request to the {apiUrl}/ordermanagement/v1/orders/{order_id}/shipping-info  endpoint.

Provide order_id as path parameter. The order_id is the identifier you get in a successful response when placing a new order.

Include the following required body parameters in your request:

  • return_shipping_company : name of the shipping company for the return shipment
  • return_tracking_number : tracking number that identifies the return shipment
  • return_tracking_uri : URL where the customer can track the return shipment
  • shipping_company : logistics company (carrier) managing the delivery. For more information, see the carrier list.
  • shipping_method : method for delivering the goods
  • tracking_number : tracking number that identifies the shipment
  • tracking_uri : URI where the customer can track their shipment
  "shipping_info": [
      "return_shipping_company": "DHL US",
      "return_tracking_number": "93456415674545679888",
      "return_tracking_uri": "http://shipping.example/findmypackage?93456415674545679888",
      "shipping_company": "DHL US",
      "shipping_method": "Home",
      "tracking_number": "63456415674545679874",
      "tracking_uri": "http://shipping.example/findmypackage?63456415674545679874"

Sample request to add shipping information.

You can add different shipping information for different items in the same call. For example, suppose a single order includes two packages associated with two different shipments and tracking numbers; in that case, you have to send the shipping_info details for each item.

You can learn more about shipping companies in the Carrier partner section.

If your request is successful, you'll receive a 204 No content response.

Error response

If your request contains errors, you'll receive an error response. Ensure the order_id value you provided is valid and correctly formatted.

You can use the correlation_id and the order_id values to troubleshoot the call in the Merchant Portal logs section.

  "error_code": "NO_SUCH_ORDER",
  "error_messages": [
    "Order 7849fd84-47dc-4919-a7ce-47b9f46156f cannot be found. Shipping info cannot be added to order 7849fd84-47dc-4919-a7ce-47b9f46156f."
  "correlation_id": "f072554f-ef99-4b21-85da-633355aab998"

Sample of an error response to add shipping information.

Ready to send this request? See the API reference of this call.