> 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/returns-api/grp-returns-api/api-methods/ingestion-methods.md). Agents can also search and read this documentation through its [MCP server](https://developer.esw.com/~gitbook/mcp).

# Ingestion Methods

Create, update, and submit outbound orders and shipments for returns processing.

## POST- Create Order <a href="#post-create-order" id="post-create-order"></a>

In scenarios where a full customer order can be ingested, such as from an Order Management System (OMS), this method can be used to create or replace the outbound order on the ESW returns platform.

The `canOverwrite` boolean field can be used to control how the action is allowed to proceed.

* When this is set to `TRUE` the initial request will create the order and subsequent requests made for the same order will replace the entire order. If any items in the original request had a shipping\
  status of shipped the request will fail with a HTTP 400 Bad Request.
* When this is set to `FALSE` the initial request will create the order and subsequent requests will return an HTTP 409 conflict. This will protect against accidental overwrites and boost performance.

{% hint style="info" icon="info" %}
`orderItems` can have a shipping status of `Unshipped`, `Shipped`, or `Cancelled`.

If a shipping status is omitted in the `POST` request, then a default shipping status of ‘`Unshipped`’ will be applied to each order item
{% endhint %}

## POST /returns/v1/{identifier}/outbound-orders

> Creates an Outbound Order

```json
{"openapi":"3.1.1","info":{"title":"GRP Returns 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":{"Returns.Oms.Api.UseCases.CreateOrder.CreateOrderWebResponse":{"description":"Web Response for successful Outbound Order Create","type":"object","properties":{"id":{"description":"Outbound order identifier","type":"string"},"orderItems":{"description":"Order items","type":"array","items":{"$ref":"#/components/schemas/Returns.Oms.Api.UseCases.CreateOrder.OrderItemWebResponse"}}},"additionalProperties":false},"Returns.Oms.Api.UseCases.CreateOrder.OrderItemWebResponse":{"description":"Order item Web Request","type":"object","properties":{"id":{"description":"Order item identifier","type":"string"},"productCode":{"description":"Product code","type":"string"},"lineItemId":{"description":"Line item id","type":"string"},"productDescription":{"description":"Product description","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.CreateOrder.CreateOrderWebRequest":{"description":"Web Request for creating an outbound order","type":"object","properties":{"orderReference":{"description":"Order Reference","type":"string"},"contactInformation":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.CreateOrder.OrderContactInformationRequestDto"},"orderItems":{"description":"Product items","type":"array","items":{"$ref":"#/components/schemas/Returns.Oms.Api.UseCases.CreateOrder.OrderItemWebRequestDto"}},"customFields":{"description":"Custom fields","type":"object","additionalProperties":{"additionalProperties":{"type":"string"}}},"canOverwrite":{"description":"Can Overwrite","type":"boolean"},"retailerIdentifier":{"description":"Retailer Identifier","type":"string"},"externalBrandIdentifier":{"description":"External Brand Identifier","type":"string"}},"additionalProperties":false},"Returns.Oms.Application.UseCases.CreateOrder.OrderContactInformationRequestDto":{"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.Api.UseCases.CreateOrder.OrderItemWebRequestDto":{"description":"Order item Request DTO","type":"object","properties":{"productCode":{"description":"Product code","type":"string"},"merchantId":{"description":"Optional merchant product identifier, independent of ProductCode.","type":"string"},"manufactureId":{"description":"Optional manufacturer product identifier, independent of ProductCode and customs MID.","type":"string"},"ean":{"description":"Optional European Article Number, including any leading zeros.","type":"string"},"upc":{"description":"Optional Universal Product Code, including any leading zeros.","type":"string"},"lineItemId":{"description":"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":"Material composition","type":"string"},"countryOfOriginIso":{"description":"Country of origin iso","type":"string"},"hsCode":{"description":"Hs code","type":"string"},"weight":{"$ref":"#/components/schemas/Returns.Oms.Api.UseCases.CreateOrder.WeightWebRequestDto"},"unitPrice":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.Common.UnitPriceDto"},"shippingInformation":{"$ref":"#/components/schemas/Returns.Oms.Api.UseCases.Common.ShippingInformationWebRequestDto"},"productImageUrl":{"description":"Product image url","type":"string"},"color":{"description":"Color","type":"string"},"size":{"description":"Size","type":"string"},"serialNumber":{"description":"Serial Number","type":"string"},"category":{"description":"Category","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"},"fulfilmentInformation":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.Common.FulfilmentInformationDto"},"mid":{"description":"MID","type":"string"},"midZipCode":{"description":"MIDZipCode","type":"string"}},"additionalProperties":false},"Returns.Oms.Api.UseCases.CreateOrder.WeightWebRequestDto":{"description":"Weight Request DTO","type":"object","properties":{"weightTotal":{"format":"double","description":"Weight total","type":"number"},"weightUnit":{"$ref":"#/components/schemas/Returns.Oms.Api.UseCases.CreateOrder.RequestWeightUnit"}},"additionalProperties":false},"Returns.Oms.Api.UseCases.CreateOrder.RequestWeightUnit":{"description":"Request weight unit","enum":["Kg","Lb"],"type":"string"},"Returns.Oms.Application.UseCases.Common.UnitPriceDto":{"type":"object","properties":{"amount":{"format":"double","type":"number"},"currency":{"type":"string"}},"additionalProperties":false},"Returns.Oms.Api.UseCases.Common.ShippingInformationWebRequestDto":{"description":"Shipping information web request DTO","type":"object","properties":{"shippingReference":{"description":"Shipping reference","type":"string"},"barcodeReference":{"description":"Barcode reference","type":"string"},"shippingStatus":{"$ref":"#/components/schemas/Returns.Oms.Domain.Enums.ShippingStatus"},"statusDate":{"format":"date-time","description":"Status date","type":"string"}},"additionalProperties":false},"Returns.Oms.Domain.Enums.ShippingStatus":{"enum":["Unshipped","Shipped","Cancelled"],"type":"string"},"Returns.Oms.Application.UseCases.Common.FulfilmentInformationDto":{"type":"object","properties":{"centreId":{"type":"string"},"countryIso":{"type":"string"}},"additionalProperties":false}}},"paths":{"/returns/v1/{identifier}/outbound-orders":{"post":{"tags":["Ingestion"],"summary":"Creates an Outbound Order","parameters":[{"schema":{"type":"string"},"in":"path","name":"identifier","required":true}],"responses":{"201":{"description":"The Outbound Order has been successfully created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Returns.Oms.Api.UseCases.CreateOrder.CreateOrderWebResponse"}}}},"400":{"description":"Validation has failed for Outbound Order creation 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":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"409":{"description":"The Outbound Order already exists. (If replaceOrderPermitted is false)","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.CreateOrder.CreateOrderWebRequest"}}},"description":"The request body"}}}}}
```

## PUT- Update Order <a href="#put-update-order" id="put-update-order"></a>

This method can be used to update either customer contact information, custom fields, or order items by passing whichever property requires an update and assigning a ‘null’ value to the remaining ones. However, to update an order, the order must exist prior to calling this endpoint otherwise a ‘not found’ response will be returned.

* When supplied, `contactInformation` the custom fields are simply replaced in the existing order with the new information.
* If an existing item in the list cannot be identified, a new item is appended to the list. In this case, all mandatory fields for a new item must be supplied.

{% hint style="info" icon="info" %}
Items that have a shipping status of ‘`Shipped`’ or ‘`Cancelled`’ cannot be updated. `countryIso` cannot be changed using this endpoint.
{% endhint %}

## PUT /returns/v1/{identifier}/outbound-orders/{orderReference}

> Updates an Outbound Order

```json
{"openapi":"3.1.1","info":{"title":"GRP Returns 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":{"Returns.Oms.Api.UseCases.UpdateOrder.UpdateOrderWebResponse":{"description":"Web Response for updating an outbound order","type":"object","properties":{"contactInformation":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.CreateOrder.OrderContactInformationRequestDto"},"orderItems":{"description":"Product items","type":"array","items":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.Common.OrderItemRequestDto"}},"customFields":{"description":"Custom fields","type":"object","additionalProperties":{"additionalProperties":{"type":"string"}}}},"additionalProperties":false},"Returns.Oms.Application.UseCases.CreateOrder.OrderContactInformationRequestDto":{"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.Common.OrderItemRequestDto":{"type":"object","properties":{"id":{"type":"string"},"productCode":{"type":"string"},"merchantId":{"type":"string"},"manufactureId":{"type":"string"},"monolithId":{"format":"int64","type":"integer"},"parentProductCode":{"type":"string"},"lineItemId":{"type":"string"},"retailerLineItemId":{"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.Common.WeightDto"},"unitPrice":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.Common.UnitPriceDto"},"unitCharges":{"type":"array","items":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.Common.UnitChargeDto"}},"refundCharges":{"type":"array","items":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.Common.UnitChargeDto"}},"shippingInformation":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.CreateOrder.ShippingInformationRequestDto"},"deliveryEstimates":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.Common.DeliveryEstimatesDto"},"replacementInformation":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.Common.ReplacementInformationDto"},"productImageUrl":{"type":"string"},"color":{"type":"string"},"size":{"type":"string"},"serialNumber":{"type":"string"},"category":{"type":"string"},"colorNumber":{"type":"string"},"styleNumber":{"type":"string"},"gtin":{"type":"string"},"ean":{"type":"string"},"upc":{"type":"string"},"categoryDescription":{"type":"string"},"personalized":{"type":"boolean"},"isDigital":{"type":"boolean"},"dangerousGoods":{"type":"boolean"},"unitedNationsNumber":{"type":"string"},"packingInstructions":{"type":"string"},"prohibitedForReturns":{"type":"boolean"},"source":{"$ref":"#/components/schemas/Returns.Oms.Domain.Enums.OrderItemSource"},"material":{"type":"string"},"gender":{"type":"string"},"ageGroup":{"type":"string"},"productUrl":{"type":"string"},"fulfilmentInformation":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.Common.FulfilmentInformationDto"},"articlePaymentReceived":{"type":"boolean"},"mid":{"type":"string"},"midZipCode":{"type":"string"},"promotions":{"type":"array","items":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.Common.PromotionDto"}}},"additionalProperties":false},"Returns.Oms.Application.UseCases.Common.WeightDto":{"type":"object","properties":{"weightTotal":{"format":"double","type":"number"},"weightUnit":{"$ref":"#/components/schemas/Returns.Oms.Domain.Enums.WeightUnit"}},"additionalProperties":false},"Returns.Oms.Domain.Enums.WeightUnit":{"enum":["Kg","Lb"],"type":"string"},"Returns.Oms.Application.UseCases.Common.UnitPriceDto":{"type":"object","properties":{"amount":{"format":"double","type":"number"},"currency":{"type":"string"}},"additionalProperties":false},"Returns.Oms.Application.UseCases.Common.UnitChargeDto":{"type":"object","properties":{"name":{"type":"string"},"amount":{"format":"double","type":"number"},"currency":{"type":"string"}},"additionalProperties":false},"Returns.Oms.Application.UseCases.CreateOrder.ShippingInformationRequestDto":{"type":"object","properties":{"shippingReference":{"type":"string"},"shippingReferenceLastMile":{"type":"string"},"barcodeReference":{"type":"string"},"carrierReference":{"type":"string"},"shippingStatus":{"$ref":"#/components/schemas/Returns.Oms.Domain.Enums.ShippingStatus"},"statusDate":{"format":"date-time","type":"string"}},"additionalProperties":false},"Returns.Oms.Domain.Enums.ShippingStatus":{"enum":["Unshipped","Shipped","Cancelled"],"type":"string"},"Returns.Oms.Application.UseCases.Common.DeliveryEstimatesDto":{"type":"object","properties":{"eddMinDate":{"format":"date-time","type":"string"},"eddMaxDate":{"format":"date-time","type":"string"}},"additionalProperties":false},"Returns.Oms.Application.UseCases.Common.ReplacementInformationDto":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/Returns.Oms.Domain.Enums.ReplacementType"},"reason":{"type":"string"},"isReplacementFor":{"type":"string"},"brandOrderReference":{"type":"string"}},"additionalProperties":false},"Returns.Oms.Domain.Enums.ReplacementType":{"enum":["Replacement","Replaced","ExchangeReplacement","Exchanged","NativeExchangeReplacement"],"type":"string"},"Returns.Oms.Domain.Enums.OrderItemSource":{"format":"int32","enum":[0,1],"type":"integer"},"Returns.Oms.Application.UseCases.Common.FulfilmentInformationDto":{"type":"object","properties":{"centreId":{"type":"string"},"countryIso":{"type":"string"}},"additionalProperties":false},"Returns.Oms.Application.UseCases.Common.PromotionDto":{"type":"object","properties":{"id":{"type":"string"},"discountType":{"$ref":"#/components/schemas/Returns.Oms.Domain.Enums.DiscountType"},"discountValue":{"format":"double","type":"number"}},"additionalProperties":false},"Returns.Oms.Domain.Enums.DiscountType":{"format":"int32","enum":[0,1,2,3],"type":"integer"},"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.UpdateOrder.UpdateOrderWebRequest":{"description":"Web Request for updating an outbound order","type":"object","properties":{"contactInformation":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.UpdateOrder.ContactInformationUpdateRequestDto"},"orderItems":{"description":"Product items","type":"array","items":{"$ref":"#/components/schemas/Returns.Oms.Api.UseCases.CreateOrder.OrderItemWebRequestDto"}},"customFields":{"description":"Custom fields","type":"object","additionalProperties":{"additionalProperties":{"type":"string"}}},"retailerIdentifier":{"description":"Retailer Identifier","type":"string"},"externalBrandIdentifier":{"description":"External Brand Identifier","type":"string"}},"additionalProperties":false},"Returns.Oms.Application.UseCases.UpdateOrder.ContactInformationUpdateRequestDto":{"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"},"email":{"type":"string"},"telephone":{"type":"string"},"cultureLanguageIso":{"type":"string"}},"additionalProperties":false},"Returns.Oms.Api.UseCases.CreateOrder.OrderItemWebRequestDto":{"description":"Order item Request DTO","type":"object","properties":{"productCode":{"description":"Product code","type":"string"},"merchantId":{"description":"Optional merchant product identifier, independent of ProductCode.","type":"string"},"manufactureId":{"description":"Optional manufacturer product identifier, independent of ProductCode and customs MID.","type":"string"},"ean":{"description":"Optional European Article Number, including any leading zeros.","type":"string"},"upc":{"description":"Optional Universal Product Code, including any leading zeros.","type":"string"},"lineItemId":{"description":"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":"Material composition","type":"string"},"countryOfOriginIso":{"description":"Country of origin iso","type":"string"},"hsCode":{"description":"Hs code","type":"string"},"weight":{"$ref":"#/components/schemas/Returns.Oms.Api.UseCases.CreateOrder.WeightWebRequestDto"},"unitPrice":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.Common.UnitPriceDto"},"shippingInformation":{"$ref":"#/components/schemas/Returns.Oms.Api.UseCases.Common.ShippingInformationWebRequestDto"},"productImageUrl":{"description":"Product image url","type":"string"},"color":{"description":"Color","type":"string"},"size":{"description":"Size","type":"string"},"serialNumber":{"description":"Serial Number","type":"string"},"category":{"description":"Category","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"},"fulfilmentInformation":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.Common.FulfilmentInformationDto"},"mid":{"description":"MID","type":"string"},"midZipCode":{"description":"MIDZipCode","type":"string"}},"additionalProperties":false},"Returns.Oms.Api.UseCases.CreateOrder.WeightWebRequestDto":{"description":"Weight Request DTO","type":"object","properties":{"weightTotal":{"format":"double","description":"Weight total","type":"number"},"weightUnit":{"$ref":"#/components/schemas/Returns.Oms.Api.UseCases.CreateOrder.RequestWeightUnit"}},"additionalProperties":false},"Returns.Oms.Api.UseCases.CreateOrder.RequestWeightUnit":{"description":"Request weight unit","enum":["Kg","Lb"],"type":"string"},"Returns.Oms.Api.UseCases.Common.ShippingInformationWebRequestDto":{"description":"Shipping information web request DTO","type":"object","properties":{"shippingReference":{"description":"Shipping reference","type":"string"},"barcodeReference":{"description":"Barcode reference","type":"string"},"shippingStatus":{"$ref":"#/components/schemas/Returns.Oms.Domain.Enums.ShippingStatus"},"statusDate":{"format":"date-time","description":"Status date","type":"string"}},"additionalProperties":false}}},"paths":{"/returns/v1/{identifier}/outbound-orders/{orderReference}":{"put":{"tags":["Ingestion"],"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.Oms.Api.UseCases.UpdateOrder.UpdateOrderWebResponse"}}}},"400":{"description":"Validation has failed for Outbound Order update 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":{"schema":{"$ref":"#/components/schemas/Returns.Oms.Api.UseCases.UpdateOrder.UpdateOrderWebRequest"}}},"description":"The request body"}}}}}
```

## POST- Submit Shipment <a href="#post-submit-shipment" id="post-submit-shipment"></a>

In the instances where the data is ingested from a shipment system rather than customer orders from an OMS, this method can be used to build up the order from one or more individual shipments. The `ShippingReference` and `ShippingDate` fields apply to all shipping items in the request. The shipment has to be ‘dispatched’ for this method to be used. If a request is successful, the shipment information is stored against a new or existing order.

## POST /returns/v1/{identifier}/outbound-shipments

> Submits an Outbound Shipment

```json
{"openapi":"3.1.1","info":{"title":"GRP Returns 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":{"Returns.Oms.Api.UseCases.SubmitOutboundShipment.SubmitOutboundShipmentWebResponse":{"description":"Web Response for successful Submit Outbound Shipment","type":"object","properties":{"id":{"description":"Outbound order identifier","type":"string"},"shippingItems":{"description":"Shipping items","type":"array","items":{"$ref":"#/components/schemas/Returns.Oms.Api.UseCases.SubmitOutboundShipment.ShippingItemWebResponse"}}},"additionalProperties":false},"Returns.Oms.Api.UseCases.SubmitOutboundShipment.ShippingItemWebResponse":{"description":"Shipping item Web Response","type":"object","properties":{"id":{"description":"Shipping item identifier","type":"string"},"productCode":{"description":"Product code","type":"string"},"lineItemId":{"description":"Line item id","type":"string"},"productDescription":{"description":"Product description","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.SubmitOutboundShipment.SubmitOutboundShipmentWebRequest":{"description":"Submit Outbound Shipment Web Request Object","type":"object","properties":{"orderReference":{"description":"Order Reference","type":"string"},"shippingReference":{"description":"Shipping Reference","type":"string"},"barcodeReference":{"description":"Barcode Reference","type":"string"},"shippingDate":{"format":"date-time","description":"Shipping Date","type":"string"},"contactInformation":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.CreateOrder.OrderContactInformationRequestDto"},"shippingItems":{"description":"Shipping Items","type":"array","items":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.SubmitOutboundShipment.ShippingItemRequestDto"}},"shippingWeight":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.Common.ShippingWeightDto"},"shippingDimensions":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.Common.ShippingDimensionsDto"},"customFields":{"description":"Custom Fields","type":"object","additionalProperties":{"additionalProperties":{"type":"string"}}},"retailerIdentifier":{"description":"Retailer Identifier","type":"string"},"externalBrandIdentifier":{"description":"External Brand Identifier","type":"string"}},"additionalProperties":false},"Returns.Oms.Application.UseCases.CreateOrder.OrderContactInformationRequestDto":{"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.SubmitOutboundShipment.ShippingItemRequestDto":{"type":"object","properties":{"productCode":{"type":"string"},"merchantId":{"type":"string"},"manufactureId":{"type":"string"},"lineItemId":{"type":"string"},"ean":{"type":"string"},"upc":{"type":"string"},"quantity":{"format":"int32","type":"integer"},"productDescription":{"type":"string"},"productCustomsDescription":{"type":"string"},"composition":{"type":"string"},"countryOfOriginIso":{"type":"string"},"hsCode":{"type":"string"},"weight":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.Common.WeightDto"},"unitPrice":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.Common.UnitPriceDto"},"productImageUrl":{"type":"string"},"color":{"type":"string"},"size":{"type":"string"},"serialNumber":{"type":"string"},"category":{"type":"string"},"personalized":{"type":"boolean"},"isDigital":{"type":"boolean"},"dangerousGoods":{"type":"boolean"},"unitedNationsNumber":{"type":"string"},"packingInstructions":{"type":"string"},"prohibitedForReturns":{"type":"boolean"},"replacementInformation":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.SubmitOutboundShipment.ShipmentReplacementInformationDto"},"fulfilmentInformation":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.Common.FulfilmentInformationDto"},"mid":{"type":"string"},"midZipCode":{"type":"string"}},"additionalProperties":false},"Returns.Oms.Application.UseCases.Common.WeightDto":{"type":"object","properties":{"weightTotal":{"format":"double","type":"number"},"weightUnit":{"$ref":"#/components/schemas/Returns.Oms.Domain.Enums.WeightUnit"}},"additionalProperties":false},"Returns.Oms.Domain.Enums.WeightUnit":{"enum":["Kg","Lb"],"type":"string"},"Returns.Oms.Application.UseCases.Common.UnitPriceDto":{"type":"object","properties":{"amount":{"format":"double","type":"number"},"currency":{"type":"string"}},"additionalProperties":false},"Returns.Oms.Application.UseCases.SubmitOutboundShipment.ShipmentReplacementInformationDto":{"type":"object","properties":{"replacedProductCode":{"type":"string"},"replacedLineItemId":{"type":"string"}},"additionalProperties":false},"Returns.Oms.Application.UseCases.Common.FulfilmentInformationDto":{"type":"object","properties":{"centreId":{"type":"string"},"countryIso":{"type":"string"}},"additionalProperties":false},"Returns.Oms.Application.UseCases.Common.ShippingWeightDto":{"type":"object","properties":{"totalWeight":{"format":"double","type":"number"},"weightUnit":{"$ref":"#/components/schemas/Returns.Oms.Application.UseCases.Common.ShippingWeightUnit"}},"additionalProperties":false},"Returns.Oms.Application.UseCases.Common.ShippingWeightUnit":{"enum":["Kg","Lb"],"type":"string"},"Returns.Oms.Application.UseCases.Common.ShippingDimensionsDto":{"type":"object","properties":{"length":{"format":"double","type":"number"},"width":{"format":"double","type":"number"},"height":{"format":"double","type":"number"},"unit":{"$ref":"#/components/schemas/Returns.Oms.Domain.Enums.DimensionsUnit"}},"additionalProperties":false},"Returns.Oms.Domain.Enums.DimensionsUnit":{"enum":["Cm","In"],"type":"string"}}},"paths":{"/returns/v1/{identifier}/outbound-shipments":{"post":{"tags":["Ingestion"],"summary":"Submits an Outbound Shipment","parameters":[{"schema":{"type":"string"},"in":"path","name":"identifier","required":true}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Returns.Oms.Api.UseCases.SubmitOutboundShipment.SubmitOutboundShipmentWebResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"}}}},"401":{"description":"Unauthorized","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"}}}},"500":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Returns.Oms.Api.UseCases.SubmitOutboundShipment.SubmitOutboundShipmentWebRequest"}}},"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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.esw.com/returns-api/grp-returns-api/api-methods/ingestion-methods.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
