> For the complete documentation index, see [llms.txt](https://developer.esw.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.esw.com/package-management/package-management-api/api-methods/update-a-package.md).

# Update a Package

{% hint style="info" icon="memo-circle-info" %}
The  Update Package request can only be used for packages that are pending[^1].
{% endhint %}

* `tenantCode`, `orderReference`, and `packageReference` parameters identify the package and cannot be updated using the **Update Package** request.
* If `shippingStatus` is not provided in the body of request, the package status is set to `Complete` and the package cannot be updated again.
* For other parameters, if any new values are provided in the body of the request, the existing data is replaced with the new data. If no values are provided, any existing values are used instead.

> For example, if `consigneeAddress.address2` existed for a package, but no new value is provided for this parameter in the **Update Package** request, then the new parameter value will be null and the existing value will be used.

## PUT /packagemanagement/v1/{tenantCode}/orders/{orderReference}/packages/{packageReference}

> Updates certain fields of a package for a specified tenant, order reference and package reference.

```json
{"openapi":"3.1.1","info":{"title":"Package Management API","version":"1"},"servers":[{"url":"https://api.sandbox.esw.com"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header","description":"Please insert JWT with Bearer into field"}},"schemas":{"Logistics.PackageManagement.WebApiService.Models.Responses.UpdatePackageResponse":{"type":"object","properties":{"outcome":{"$ref":"#/components/schemas/Logistics.PackageManagement.Domain.Enums.Outcome"},"status":{"description":"The status of the shipping documentation generation.","type":"string"},"package":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Responses.PackageResponse"}},"additionalProperties":false},"Logistics.PackageManagement.Domain.Enums.Outcome":{"enum":["PackageCreated","PackageAndLabelCreated","PackageCreatedAndLabelError","PackageCreatedAndLabelOnHold","PackageAndLabelUpdated","PackageUpdatedAndLabelError","PackageUpdated"],"type":"string"},"Logistics.PackageManagement.WebApiService.Models.Responses.PackageResponse":{"description":"Represents a packageWithShippingDoc with its associated details.","type":"object","properties":{"tenantCode":{"description":"The tenant code associated with the packageWithShippingDoc.","type":"string"},"orderReference":{"description":"The order reference associated with the packageWithShippingDoc.","type":"string"},"packageReference":{"description":"A unique reference for the packageWithShippingDoc.","type":"string"},"eShopPackageReference":{"description":"A unique eShop packageWithShippingDoc reference.","type":"string"},"eswCarrierIdentifier":{"description":"The carrier identifier used by ESW for the packageWithShippingDoc.","type":"string"},"carrierReference":{"description":"The carrier reference number for the packageWithShippingDoc.","type":"string"},"parcelCarrierReference":{"description":"The parcel carrier reference number for the packageWithShippingDoc.","type":"string"},"weight":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Common.WeightInfo"},"shippingStatus":{"$ref":"#/components/schemas/Logistics.PackageManagement.Domain.Enums.ShippingStatus"},"goodsDescription":{"description":"A description of the goods contained in the packageWithShippingDoc.","type":"string"},"originFulfillmentCentreCode":{"description":"The code of the origin fulfillment center.","type":"string"},"serviceLevel":{"$ref":"#/components/schemas/Logistics.PackageManagement.Domain.Enums.ServiceLevel"},"dangerousGoods":{"description":"Indicates if the packageWithShippingDoc contains dangerous goods.","type":"boolean"},"dimensionInfo":{"description":"A list of dimensions for the packageWithShippingDoc.","type":"array","items":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Responses.DimensionInfoResponse"}},"holdReleaseStatus":{"$ref":"#/components/schemas/Logistics.PackageManagement.Domain.Enums.HoldReleaseStatus"},"palletIdentifier":{"description":"A unique identifier for the pallet associated with the packageWithShippingDoc.","type":"string"},"trackingUrl":{"format":"uri","description":"The tracking URL for the packageWithShippingDoc.","type":"string"},"consigneeAddress":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Common.Consignee"},"shippingInfo":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Common.PriceInfo"},"packageItems":{"description":"A list of items contained in the packageWithShippingDoc.","type":"array","items":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Common.PackageItem"}},"metaData":{"description":"Additional metadata associated with the packageWithShippingDoc.","type":"string"},"shippingDocumentation":{"description":"Shipping documentation details for the packageWithShippingDoc.","type":"array","items":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Responses.DocumentResponse"}}},"additionalProperties":false},"Logistics.PackageManagement.WebApiService.Models.Common.WeightInfo":{"description":"Represents the weight information of a package or item.","required":["weight","weightUnit"],"type":"object","properties":{"weight":{"format":"double","description":"The weight value of the package or item.","type":"number"},"weightUnit":{"description":"The unit of measurement for the weight (e.g., kg, lb).","type":"string"}},"additionalProperties":false},"Logistics.PackageManagement.Domain.Enums.ShippingStatus":{"enum":["Complete","Pending"],"type":"string"},"Logistics.PackageManagement.Domain.Enums.ServiceLevel":{"enum":["POST","EXP2","PUDO"],"type":"string"},"Logistics.PackageManagement.WebApiService.Models.Responses.DimensionInfoResponse":{"required":["height","length","measurementUnit","width"],"type":"object","properties":{"source":{"description":"The source of the dimension information, such as the carrier or system that provided it.","type":"string","readOnly":true},"length":{"format":"double","description":"The length of the package.","type":"number"},"width":{"format":"double","description":"The width of the package.","type":"number"},"height":{"format":"double","description":"The height of the package.","type":"number"},"measurementUnit":{"description":"The unit of measurement for the dimensions (e.g., cm, inches).","type":"string"},"weight":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Common.WeightInfo"}},"additionalProperties":false},"Logistics.PackageManagement.Domain.Enums.HoldReleaseStatus":{"enum":["Release","Hold","ReturnToRetailer"],"type":"string"},"Logistics.PackageManagement.WebApiService.Models.Common.Consignee":{"description":"Represents information about the consignee (recipient) of a package.","type":"object","properties":{"firstName":{"description":"The first name of the consignee.","type":"string"},"lastName":{"description":"The last name of the consignee.","type":"string"},"address1":{"description":"The first line of the consignee's address.","type":"string"},"address2":{"description":"The second line of the consignee's address (optional).","type":"string"},"address3":{"description":"The third line of the consignee's address (optional).","type":"string"},"city":{"description":"The city where the consignee resides.","type":"string"},"postalCode":{"description":"The postal or ZIP code of the consignee's address.","type":"string"},"poBox":{"description":"The Post Office (PO) Box number, if applicable.","type":"string"},"region":{"description":"The region or state where the consignee resides.","type":"string"},"countryIso":{"description":"The alpha-2 character ISO code of the country.","type":"string"},"email":{"description":"The email address of the consignee.","type":"string"},"telephone":{"description":"The telephone number of the consignee.","type":"string"}},"additionalProperties":false},"Logistics.PackageManagement.WebApiService.Models.Common.PriceInfo":{"description":"Represents pricing information including amount and currency.","required":["amount","currency"],"type":"object","properties":{"amount":{"format":"decimal","description":"The monetary amount of the price.","type":"number"},"currency":{"description":"The currency code (e.g., USD, EUR) for the price.","type":"string"}},"additionalProperties":false},"Logistics.PackageManagement.WebApiService.Models.Common.PackageItem":{"description":"Represents an individual item within a package.","required":["productCode","quantity"],"type":"object","properties":{"productCode":{"description":"The unique product code for the item.","type":"string"},"lineItemId":{"format":"int32","description":"The line item ID associated with the item, if applicable.","type":"integer"},"quantity":{"format":"int32","description":"The quantity of the item included in the package.","type":"integer"},"productDescription":{"description":"A description of the product.","type":"string"},"productCustomsDescription":{"description":"A description of the product for customs purposes.","type":"string"},"countryOfOriginIso":{"description":"The ISO code of the country where the product originated.","type":"string"},"weight":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Common.WeightInfo"},"unitPriceInfo":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Common.PriceInfo"},"dangerousGoods":{"description":"Indicates if the item is classified as dangerous goods.","type":"boolean"},"hsCode":{"description":"The Harmonized System (HS) code for the item.","type":"string"},"metaData":{"format":"json","description":"Additional metaDataParsed associated with the item.","type":"string"}},"additionalProperties":false},"Logistics.PackageManagement.WebApiService.Models.Responses.DocumentResponse":{"description":"Represents the shipping documentation details for a package.","type":"object","properties":{"document":{"description":"The content of the document.","type":"string"},"type":{"$ref":"#/components/schemas/Logistics.PackageManagement.Domain.Enums.DocumentType"},"format":{"$ref":"#/components/schemas/Logistics.PackageManagement.Domain.Enums.LabelFormat"},"link":{"description":"A link to the document, if available.","type":"string"},"documentStatus":{"$ref":"#/components/schemas/Logistics.PackageManagement.Domain.Enums.DocumentStatus"}},"additionalProperties":false},"Logistics.PackageManagement.Domain.Enums.DocumentType":{"enum":["HubHandlingLabel","ShippingLabel","SupportingDocumentation","AdditionalDocumentation"],"type":"string"},"Logistics.PackageManagement.Domain.Enums.LabelFormat":{"enum":["Zpl","Pdf","NoLabel"],"type":"string"},"Logistics.PackageManagement.Domain.Enums.DocumentStatus":{"enum":["Created","Error"],"type":"string"},"Logistics.PackageManagement.WebApiService.Models.Responses.ErrorResponse":{"description":"Represents an error response containing detailed information about validation or server errors.","type":"object","properties":{"errors":{"description":"A collection of errors where the key is the field name and the value is a list of error messages.","type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"type":{"description":"The type of error encountered.","type":"string"},"title":{"description":"A brief title or summary of the error.","type":"string"},"status":{"format":"int32","description":"The HTTP status code associated with the error.","type":"integer"},"detail":{"description":"Detailed information about the error.","type":"string"},"instance":{"description":"An instance identifier for tracing the error.","type":"string"},"additionalProp1":{"description":"Additional property 1, used for custom data.","type":"string"},"additionalProp2":{"description":"Additional property 2, used for custom data.","type":"string"},"additionalProp3":{"description":"Additional property 3, used for custom data.","type":"string"},"traceId":{"description":"A trace identifier for debugging or logging purposes.","type":"string"}},"additionalProperties":false},"Logistics.PackageManagement.WebApiService.Models.Requests.UpdatePackageRequest":{"type":"object","properties":{"weight":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Common.WeightInfo"},"shippingStatus":{"description":"The shipping status of the package.","type":"string"},"serviceLevel":{"description":"The service level for shipping (e.g., standard, express).","type":"string"},"eswCarrierIdentifier":{"description":"The identifier for the carrier (e.g., ESW carrier code).","type":"string"},"carrierReference":{"description":"The reference number provided by the carrier for the package.","type":"string"},"carrierServiceDescription":{"description":"The description of the carrier service used for shipping the package.","type":"string"},"originFulfillmentCentreCode":{"description":"The code of the origin fulfillment center.","type":"string"},"dimensionInfo":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Requests.DimensionInfoRequest"},"consigneeAddress":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Requests.UpdatePackageAddressRequest"},"metaData":{"format":"json","description":"Additional metadata related to the package.","type":"string"}},"additionalProperties":false},"Logistics.PackageManagement.WebApiService.Models.Requests.DimensionInfoRequest":{"required":["height","length","measurementUnit","width"],"type":"object","properties":{"length":{"format":"double","description":"The length of the package.","type":"number"},"width":{"format":"double","description":"The width of the package.","type":"number"},"height":{"format":"double","description":"The height of the package.","type":"number"},"measurementUnit":{"description":"The unit of measurement for the dimensions (e.g., cm, inches).","type":"string"},"weight":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Common.WeightInfo"}},"additionalProperties":false},"Logistics.PackageManagement.WebApiService.Models.Requests.UpdatePackageAddressRequest":{"type":"object","properties":{"address1":{"description":"The first line of the address.","type":"string"},"address2":{"description":"The second line of the address (optional).","type":"string"},"address3":{"description":"The third line of the address (optional).","type":"string"},"city":{"description":"The city of the address.","type":"string"},"poBox":{"description":"The Post Office (PO) Box number, if applicable.","type":"string"},"region":{"description":"The region or state of the address.","type":"string"},"postalCode":{"description":"The postal or ZIP code of the address.","type":"string"}},"additionalProperties":false}}},"paths":{"/packagemanagement/v1/{tenantCode}/orders/{orderReference}/packages/{packageReference}":{"put":{"tags":["Package"],"summary":"Updates certain fields of a package for a specified tenant, order reference and package reference.","parameters":[{"schema":{"type":"string"},"in":"path","name":"tenantCode","required":true},{"schema":{"type":"string"},"in":"path","name":"orderReference","required":true},{"schema":{"type":"string"},"in":"path","name":"packageReference","required":true}],"responses":{"200":{"description":"Package updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Responses.UpdatePackageResponse"}}}},"400":{"description":"Invalid request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Responses.ErrorResponse"}}}},"401":{"description":"Unauthenticated client.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Responses.ErrorResponse"}}}},"403":{"description":"Client does not have access rights to the resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Responses.ErrorResponse"}}}},"404":{"description":"Requested resource does not exist (tenantCode, orderReference, or packageReference).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Responses.ErrorResponse"}}}},"500":{"description":"An unexpected error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Responses.ErrorResponse"}}}}},"requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Requests.UpdatePackageRequest"}},"application/json":{"schema":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Requests.UpdatePackageRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Requests.UpdatePackageRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Logistics.PackageManagement.WebApiService.Models.Requests.UpdatePackageRequest"}}},"description":"The request payload containing package details."}}}}}
```

[^1]: Packages that are not ready for shipping from the ESW hub or the retailer warehouse.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.esw.com/package-management/package-management-api/api-methods/update-a-package.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
