Orders – Update Shipping Address and Method for Orders

The POST updateOrder endpoint can be used update the information for your orders.

The ShippingAddress included in the URL is used to update the shipping address for your orders in the system.

The ShippingMethod included in the URL is used to update the shipping method for your orders in the system.

You must include the recipeid and the partnerBillingKey when updating an order in your system. You can retrieve these from your API page in the Settings of the Gooten Admin.

Please note that you can only update the shipping address and method for orders in the following statuses:

    • New
    • Hold
    • Pending
    • ReadyForAccounting
    • ReadyForImageDI
    • NeedsCustomization
    • NeedsManualApproval
    • AccountingIssue
    • AddressIssue
    • PaymentIssue
    • ImageIssue
    • HoldByCIImageIssue
Update the Shipping Address

1. Send a POST API request to the following URL below. Please be sure to replace the recipeid and partnerBillingKey with your proper ID and key from the Gooten Admin.

https://api.print.io/api/updateOrder/[Order_ID]/ShippingAddress?recipeid=00000000-0000-0000-0000-000000000000&partnerBillingKey=xxxxxxxxxxxxxxxxxxxxxxxxx

You must also replace the [Order_ID] value in the URL above with the order ID of the order that you want to update the shipping address of.

An example of the API request URL with an [Order_ID] can be found below:

https://api.print.io/api/updateOrder/520718/ShippingAddress?recipeid=00000000-0000-0000-0000-000000000000&partnerBillingKey=xxxxxxxxxxxxxxxxxxxxxxxxx

2. In the body of the request, you'll need to include the information for the new shipping address that you are changing for the order.

    • City - required - shipping city
    • CountryCode - required - shipping 2-letter country code
    • Email - required - user’s email
    • FirstName - required - the first name of the user
    • LastName - required - the last name of the user
    • Line1 - required - shipping address line 1
    • Line2 - optional - shipping address line 2
    • Phone - required - user’s phone
    • PostalCode - required - shipping postal code
    • State - optional - shipping state (if applicable)

You can view an example payload below:

3. Once you’ve sent the API request, the response will display a boolean value to determine if the request worked and it will display the following information.

    • OldAddress - the previous address that was set for the order before you changed it.
    • UpdatedAddress - the newly updated address that you just changed to for the order.
    • MediationId - the id for created mediation. This is typically used internally by our system to apply a suggested address.
    • MediationSettings - this contains the information about any proposed address changes, the address validation score, and any additonal data.

The example updates the shipping address by changing the contents in Line1. You can find an example response below:

{
    "HadError": false,
    "Result": {
        "OldAddress": {
            "FirstName": "John",
            "LastName": "Doo",
            "Line1": "142 W 57TH ST Suite 10-111",
            "Line2": "10th Floor",
            "City": "NEW YORK",
            "State": "NY",
            "CountryCode": "US",
            "PostalCode": "10019-3300",
            "Phone": "555-55555555",
            "Email": "test@test.com"
        },
        "UpdatedAddress": {
            "FirstName": "John",
            "LastName": "Doo",
            "Line1": "142 W 57TH ST Suite 10-222",
            "Line2": "10th Floor",
            "City": "NEW YORK",
            "State": "NY",
            "CountryCode": "US",
            "PostalCode": "10019-3300",
            "Phone": "555-55555555",
            "Email": "test@test.com"
        },
        "MediationId": 5380,
        "MediationSettings": {
            "Old.City": "NEW YORK",
            "Old.CountryCode": "US",
            "Old.Line1": "142 W 57TH ST Suite 10-222",
            "Old.Line2": "10th Floor",
            "Old.PostalCode": "10019-3300",
            "Old.State": "NY",
            "Proposed.City": "NEW YORK",
            "Proposed.CountryCode": "US",
            "Proposed.Line1": "142 W 57TH ST",
            "Proposed.PostalCode": "10019-3300",
            "Proposed.State": "NY",
            "Score": "95",
            "Suggestion": "Score: 95. Insufficient data for address verification., Apartment number not found.",
            "PartnerSourceId": "1"
        }
    }
}
Update the Shipping Method

When you update your shipping method for your order, the price of the order will be adjusted accordingly.

1. Send a POST API request to the following URL below. Please be sure to replace the recipeid and partnerBillingKey with your proper ID and key from the Gooten Admin.

https://api.print.io/api/updateOrder/[Order_ID]/ShippingMethod?recipeid=00000000-0000-0000-0000-000000000000&partnerBillingKey=xxxxxxxxxxxxxxxxxxxxxxxxx

You must also replace the [Order_ID] value in the URL above with the order ID of the order that you want to update the shipping method of.

An example of the API request URL with an [Order_ID] can be found below:

https://api.print.io/api/updateOrder/520718/ShippingMethod?recipeid=00000000-0000-0000-0000-000000000000&partnerBillingKey=xxxxxxxxxxxxxxxxxxxxxxxxx

2. In the body of the request, you'll need to include the ID of the item in the order that needs a shipping method update and you'll need the new shipping method that you're change it to.

    • OrderItemIds - the IDs for the individual order item that will be updated.
    • NewShippingMethod - the new shipping method you want to change it to. Pass in a string value of standard, expedited or overnight.

You can view an example payload below:

3. Once you’ve sent the API request, the response will display a boolean value to determine if the request worked and it will display the updated item's Id.

You can find an example response below:

{
    "HadError": false,
    "UpdatedItems": [1044686]
}