> 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/api-reference/returns-api/label.md).

# Label

## PUT /api/v1/{identifier}/outbound-orders/{orderReference}/last-mile

> Updates an Outbound Order

```json
{"openapi":"3.1.1","info":{"title":"GRP Returns API","version":"1"},"servers":[{"url":"https://api.esw.com"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header","description":"Please insert JWT with Bearer into field"}},"schemas":{"Returns.Ingestion.Api.UseCases.UpdateOutboundOrder.UpdateOutboundOrderLastMileReferenceWebResponse":{"description":"Web Response for updating an outbound order's last mile reference","type":"object","properties":{"orderItems":{"description":"Product items","type":"array","items":{"$ref":"#/components/schemas/Returns.Ingestion.Application.UseCases.Common.OrderItemRequestDto"}}},"additionalProperties":false},"Returns.Ingestion.Application.UseCases.Common.OrderItemRequestDto":{"description":"Order item Request DTO","type":"object","properties":{"id":{"description":"Identifier","type":"string"},"productCode":{"description":"Product code","type":"string"},"monolithId":{"format":"int64","description":"Monolith identifier","type":"integer"},"parentProductCode":{"description":"Parent Product Code","type":"string"},"lineItemId":{"description":"Line item id","type":"string"},"retailerLineItemId":{"description":"Retailer Line Item Id","type":"string"},"quantity":{"format":"int32","description":"Quantity","type":"integer"},"productDescription":{"description":"Product description","type":"string"},"productCustomsDescription":{"description":"Product customs description","type":"string"},"composition":{"description":"Product composition","type":"string"},"countryOfOriginIso":{"description":"Country of origin iso","type":"string"},"hsCode":{"description":"Hs code","type":"string"},"hsCodeRegion":{"description":"HS Code Region","type":"string"},"weight":{"$ref":"#/components/schemas/Returns.Ingestion.Application.UseCases.Common.WeightRequestDto"},"unitPrice":{"$ref":"#/components/schemas/Returns.Ingestion.Application.UseCases.Common.UnitPriceRequestDto"},"unitCharges":{"description":"Unit charges","type":"array","items":{"$ref":"#/components/schemas/Returns.Ingestion.Application.UseCases.Common.UnitChargeDto"}},"refundCharges":{"description":"Refund charges","type":"array","items":{"$ref":"#/components/schemas/Returns.Ingestion.Application.UseCases.Common.UnitChargeDto"}},"shippingInformation":{"$ref":"#/components/schemas/Returns.Ingestion.Application.UseCases.Common.ShippingInformationRequestDto"},"deliveryEstimates":{"$ref":"#/components/schemas/Returns.Ingestion.Application.UseCases.Common.DeliveryEstimatesDto"},"productImageUrl":{"description":"Product image url","type":"string"},"color":{"description":"Color","type":"string"},"size":{"description":"Size","type":"string"},"category":{"description":"Category","type":"string"},"colorNumber":{"description":"Color Number","type":"string"},"styleNumber":{"description":"Style Number","type":"string"},"categoryDescription":{"description":"Category Description","type":"string"},"personalized":{"description":"Is Personalized","type":"boolean"},"isDigital":{"description":"Is digital","type":"boolean"},"dangerousGoods":{"description":"Is dangerous goods","type":"boolean"},"unitedNationsNumber":{"description":"United Nations Number used for dangerous goods","type":"string"},"packingInstructions":{"description":"PI packing instructions","type":"string"},"prohibitedForReturns":{"description":"Is prohibited for returns","type":"boolean"},"source":{"$ref":"#/components/schemas/Returns.Ingestion.Domain.Enums.OrderItemSource"},"material":{"description":"Material","type":"string"},"gender":{"description":"Gender","type":"string"},"ageGroup":{"description":"Age Group","type":"string"},"productUrl":{"description":"The Product’s landing page","type":"string"},"fulfilmentInformation":{"$ref":"#/components/schemas/Returns.Ingestion.Application.UseCases.Common.FulfilmentInformationDto"},"articlePaymentReceived":{"description":"Article Payment Received - This is a flag to indicate if the payment for the article has been received","type":"boolean"},"mid":{"description":"MID","type":"string"},"midZipCode":{"description":"MIDZipCode","type":"string"},"promotions":{"description":"Promotions","type":"array","items":{"$ref":"#/components/schemas/Returns.Ingestion.Application.UseCases.Common.PromotionDto"}}},"additionalProperties":false},"Returns.Ingestion.Application.UseCases.Common.WeightRequestDto":{"description":"Weight Request DTO","type":"object","properties":{"weightTotal":{"format":"double","description":"Weight total","type":"number"},"weightUnit":{"$ref":"#/components/schemas/Returns.Ingestion.Domain.Enums.WeightUnit"}},"additionalProperties":false},"Returns.Ingestion.Domain.Enums.WeightUnit":{"enum":["Kg","Lb"],"type":"string"},"Returns.Ingestion.Application.UseCases.Common.UnitPriceRequestDto":{"description":"Unit price Request DTO","type":"object","properties":{"amount":{"format":"double","description":"Amount","type":"number"},"currency":{"description":"Currency","type":"string"}},"additionalProperties":false},"Returns.Ingestion.Application.UseCases.Common.UnitChargeDto":{"description":"Unit charge Dto","type":"object","properties":{"name":{"description":"Name","type":"string"},"amount":{"format":"double","description":"Amount","type":"number"},"currency":{"description":"Currency","type":"string"}},"additionalProperties":false},"Returns.Ingestion.Application.UseCases.Common.ShippingInformationRequestDto":{"description":"Shipping information Request Dto","type":"object","properties":{"shippingReference":{"description":"Shipping reference","type":"string"},"shippingReferenceLastMile":{"description":"Last Mile Shipping reference","type":"string"},"barcodeReference":{"description":"Barcode reference","type":"string"},"carrierReference":{"description":"Carrier reference","type":"string"},"shippingStatus":{"$ref":"#/components/schemas/Returns.Ingestion.Domain.Enums.ShippingStatus"},"statusDate":{"format":"date-time","description":"Status date","type":"string"}},"additionalProperties":false},"Returns.Ingestion.Domain.Enums.ShippingStatus":{"enum":["Unshipped","Shipped","Cancelled"],"type":"string"},"Returns.Ingestion.Application.UseCases.Common.DeliveryEstimatesDto":{"description":"Order item Request DTO","type":"object","properties":{"eddMinDate":{"format":"date-time","description":"Edd min date","type":"string"},"eddMaxDate":{"format":"date-time","description":"Edd max date","type":"string"}},"additionalProperties":false},"Returns.Ingestion.Domain.Enums.OrderItemSource":{"format":"int32","enum":[0,1],"type":"integer"},"Returns.Ingestion.Application.UseCases.Common.FulfilmentInformationDto":{"description":"Fulfilment Information","type":"object","properties":{"centreId":{"description":"Fulfilment Centre Id","type":"string"},"countryIso":{"description":"Fulfilment Centre Country ISO","type":"string"}},"additionalProperties":false},"Returns.Ingestion.Application.UseCases.Common.PromotionDto":{"description":"Promotion DTO","type":"object","properties":{"id":{"description":"Promotion identifier, code","type":"string"},"discountType":{"$ref":"#/components/schemas/Returns.Ingestion.Domain.Enums.DiscountType"},"discountValue":{"format":"double","description":"Discount value","type":"number"}},"additionalProperties":false},"Returns.Ingestion.Domain.Enums.DiscountType":{"enum":["Discount","FeeDiscount","SalePrice"],"type":"string"},"Microsoft.AspNetCore.Mvc.ValidationProblemDetails":{"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"type":{"type":"string"},"title":{"type":"string"},"status":{"format":"int32","type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"additionalProperties":{}},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"format":"int32","type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"additionalProperties":{}},"Returns.Ingestion.Api.UseCases.UpdateOutboundOrder.UpdateOutboundOrderLastMileReferenceWebRequest":{"description":"Web Request for updating an outbound order's last mile reference","type":"object","properties":{"carrierReference":{"description":"Carrier Reference","type":"string"},"shippingReferenceLastMile":{"description":"Last Mile Reference","type":"string"}},"additionalProperties":false}}},"paths":{"/api/v1/{identifier}/outbound-orders/{orderReference}/last-mile":{"put":{"tags":["Label"],"summary":"Updates an Outbound Order","parameters":[{"schema":{"type":"string"},"in":"path","name":"identifier","required":true},{"schema":{"type":"string"},"in":"path","name":"orderReference","required":true}],"responses":{"200":{"description":"The Outbound Order has been successfully updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Returns.Ingestion.Api.UseCases.UpdateOutboundOrder.UpdateOutboundOrderLastMileReferenceWebResponse"}}}},"400":{"description":"Validation has failed for Outbound Order update last mile reference request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"}}}},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"User does not have permissions to hit the endpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"404":{"description":"Outbound Order does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"500":{"description":"An unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}},"requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/Returns.Ingestion.Api.UseCases.UpdateOutboundOrder.UpdateOutboundOrderLastMileReferenceWebRequest"}},"application/json":{"schema":{"$ref":"#/components/schemas/Returns.Ingestion.Api.UseCases.UpdateOutboundOrder.UpdateOutboundOrderLastMileReferenceWebRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/Returns.Ingestion.Api.UseCases.UpdateOutboundOrder.UpdateOutboundOrderLastMileReferenceWebRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Returns.Ingestion.Api.UseCases.UpdateOutboundOrder.UpdateOutboundOrderLastMileReferenceWebRequest"}}},"description":"The request body"}}}}}
```

## POST /returns/v1/{identifier}/label

> Requests a preprinted label

```json
{"openapi":"3.1.1","info":{"title":"GRP Returns API","version":"1"},"servers":[{"url":"https://api.esw.com"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header","description":"Please insert JWT with Bearer into field"}},"schemas":{"Returns.Oms.Application.UseCases.CreateLabelRequest.CreateLabelRequestResponse":{"type":"object","properties":{"prePrintedLabelNumber":{"type":"string"},"orderReference":{"type":"string"},"shippingReference":{"type":"string"},"contentType":{"type":"string"},"carrierTrackingReference":{"type":"string"},"label":{"type":"string"}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ValidationProblemDetails":{"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"type":{"type":"string"},"title":{"type":"string"},"status":{"format":"int32","type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"additionalProperties":{}},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"format":"int32","type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"additionalProperties":{}},"Returns.Oms.Api.UseCases.LabelRequest.LabelRequestWebRequest":{"description":"Web Request for requesting a pre printed label","type":"object","properties":{"outboundOrderReference":{"description":"Outbound order reference","type":"string"},"shippingReference":{"description":"Shipping reference","type":"string"},"shopperAddress":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.CreateLabelRequest.ShopperAddressDto"},"orderItems":{"description":"Order items","type":"array","items":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.CreateLabelRequest.OrderItemsDto"}},"includeInstructions":{"description":"Include instructions with LIAB label","type":"boolean"},"labelFormat":{"description":"Label Format (ZPL or PDF)","type":"string"}},"additionalProperties":false},"Returns.Oms.Application.UseCases.CreateLabelRequest.ShopperAddressDto":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"unit":{"type":"string"},"poBox":{"type":"string"},"address1":{"type":"string"},"address2":{"type":"string"},"address3":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"countryIso":{"type":"string"},"email":{"type":"string"},"telephone":{"type":"string"},"cultureLanguageIso":{"type":"string"}},"additionalProperties":false},"Returns.Oms.Application.UseCases.CreateLabelRequest.OrderItemsDto":{"type":"object","properties":{"id":{"type":"string"},"productCode":{"type":"string"},"monolithId":{"format":"int64","type":"integer"},"parentProductCode":{"type":"string"},"lineItemId":{"type":"string"},"quantity":{"format":"int32","type":"integer"},"productDescription":{"type":"string"},"productCustomsDescription":{"type":"string"},"composition":{"type":"string"},"countryOfOriginIso":{"type":"string"},"hsCode":{"type":"string"},"hsCodeRegion":{"type":"string"},"weight":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.CreateLabelRequest.LabelRequestWeightDto"},"unitCharges":{"type":"array","items":{"$ref":"#/components/schemas/Returns.Oms.Domain.Entities.UnitCharge"}},"unitPrice":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.Common.UnitPriceDto"},"shippingInformation":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.CreateLabelRequest.LabelRequestShippingInformationRequestDto"},"colour":{"type":"string"},"size":{"type":"string"},"category":{"type":"string"},"categoryDescription":{"type":"string"},"personalized":{"type":"boolean"},"dangerousGoods":{"type":"boolean"},"unitedNationsNumber":{"type":"string"},"packingInstructions":{"type":"string"},"prohibitedForReturns":{"type":"boolean"},"source":{"type":"string"},"material":{"type":"string"},"productImageUrl":{"type":"string"},"mid":{"type":"string"},"midZipCode":{"type":"string"},"color":{"type":"string"},"gender":{"type":"string"},"ageGroup":{"type":"string"},"productUrl":{"type":"string"}},"additionalProperties":false},"Returns.Oms.Application.UseCases.CreateLabelRequest.LabelRequestWeightDto":{"type":"object","properties":{"itemWeight":{"format":"double","type":"number"},"weightUnit":{"type":"string"}},"additionalProperties":false},"Returns.Oms.Domain.Entities.UnitCharge":{"type":"object","properties":{"name":{"type":"string"},"amount":{"format":"double","type":"number"},"currency":{"type":"string"}},"additionalProperties":false},"Returns.Oms.Application.UseCases.Common.UnitPriceDto":{"type":"object","properties":{"amount":{"format":"double","type":"number"},"currency":{"type":"string"}},"additionalProperties":false},"Returns.Oms.Application.UseCases.CreateLabelRequest.LabelRequestShippingInformationRequestDto":{"type":"object","properties":{"shippingReference":{"type":"string"},"barcodeReference":{"type":"string"},"carrierReference":{"type":"string"},"shippingStatus":{"type":"string"},"statusDate":{"format":"date-time","type":"string"}},"additionalProperties":false}}},"paths":{"/returns/v1/{identifier}/label":{"post":{"tags":["Label"],"summary":"Requests a preprinted label","parameters":[{"schema":{"type":"string"},"in":"path","name":"identifier","required":true}],"responses":{"200":{"description":"The label has been successfully requested","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.CreateLabelRequest.CreateLabelRequestResponse"}}}},"400":{"description":"Validation has failed for preprinted label request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"}}}},"401":{"description":"User is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"409":{"description":"A request for this label with order reference and shipping reference already occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"500":{"description":"A unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Returns.Oms.Api.UseCases.LabelRequest.LabelRequestWebRequest"}}},"description":"The request body"}}}}}
```


---

# 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/api-reference/returns-api/label.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.
