Orders – Update the artwork for your order item

The PUT OrderImages endpoint can be used update the image for your orders.

Please note that you can only update the artwork for an item in your order as long as the order is in the following statuses:

    • Hold
    • ImageIssue
    • VendorAPIIssue
    • ReadyForImageDI
    • NeedsManualApproval
    • NeedsPersonalization
Retrieve your order images

Before updating your order images, you need to retrieve the order information for your order by sending a GET request to the order endpoint that includes the withImages = true flag in the URL query string.

1. Send a GET API request to the following URL below.

    https://api.print.io/api/orders/?id=[Order_Safe_ID]&languageCode=en&withImages=true&recipeid=YourRecipeID

Each API request to the Gooten API must have the RecipeID parameter included in the URL. This is typically used to authenticate to the Gooten API. Please be sure to replace the YourRecipeID in the example with your proper RecipeID from the Gooten Admin.

This endpoint does not use the general order ID but instead uses the Safe ID of the order. You can find the Safe ID on the Summary tab when viewing an order in the Gooten Admin.

You must replace the [Order_Safe_ID] value in the URL above with the Safe ID of the order that you want to update the artwork for.

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

    https://api.print.io/api/orders/?id=7-d3d3f61a-6039-49a0-9b02-08704f1a7ce2&languageCode=en&withImages=true&recipeid=YourRecipeID

2. Once you’ve sent the API request, the response will display all the information for the order.

You won't be needing all the information in the order. You'll need the GootenId, OrderItemId, and SpaceId to update the image in the next section.

{
    "GootenId": 529627,
    .....
    "Items": [
        {
            "OrderItemId": 1066980,
            ..........
            "Images": [
                {
                    "SourceUrl": "https://some-cdn.com/7d744a684fe03ebc7e8de545f97739dd.jpg",
                    "SpaceId": "CC38D"
                }
            ]
        }
    ]
    ......
}
Update your order images

1. Send a PUT API request to the following URL below.

    https://api.print.io/api/OrderImages/?orderId=[Order_ID]&recipeid=YourRecipeID&partnerBillingKey=YourPartnerBillingKey

Each API request to the Gooten API must have the RecipeID parameter included in the URL. This is typically used to authenticate to the Gooten API. Please be sure to replace the YourRecipeID in the example with your proper RecipeID from the Gooten Admin.

You must also replace the YourPartnerBillingKey in the example with your own Partner Billing Key from the Gooten Admin. This key is used for order related API calls.

You must also replace the [Order_ID] value in the URL above with your GootenId of the order that you got from the previous section.

An example of the API request URL with an [Order_ID] can be found below. Please note that the GootenId used below is an example and your GootenId will be different.

    https://api.print.io/api/OrderImages/?orderId=529627&recipeid=YourRecipeID&partnerBillingKey=YourPartnerBillingKey

2. In the body of the request, you'll need to include the information to update the artwork for the order item in the order.

    • OrderItemId - required - the ID of the order item in your order that you want to update the artwork for.
    • SpaceId - required - the ID of the printing space for the order item in your order that you want to update the artwork for.
    • URL - required - the URL of the new artwork for your order item in your order. This link must be a publically accessible image link otherwise the request will not work.

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 IDs of the order item where the artwork was updated.

The example updates the artwork for the order item in the order. You can find an example response below:

{
    "HadError": false,
    "UpdatedItems": {
        "UpdatedOrderItems": [
            1066980
        ]
    }
}