Set Return Item Identifiers
curl --request PUT \
--url https://api.getredo.com/v2.2/stores/{storeId}/returns/{returnId}/item-identifiers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"externalIdentifier": "<string>",
"id": "<string>"
}
]
}
'import requests
url = "https://api.getredo.com/v2.2/stores/{storeId}/returns/{returnId}/item-identifiers"
payload = { "items": [
{
"externalIdentifier": "<string>",
"id": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({items: [{externalIdentifier: '<string>', id: '<string>'}]})
};
fetch('https://api.getredo.com/v2.2/stores/{storeId}/returns/{returnId}/item-identifiers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getredo.com/v2.2/stores/{storeId}/returns/{returnId}/item-identifiers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'externalIdentifier' => '<string>',
'id' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getredo.com/v2.2/stores/{storeId}/returns/{returnId}/item-identifiers"
payload := strings.NewReader("{\n \"items\": [\n {\n \"externalIdentifier\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.getredo.com/v2.2/stores/{storeId}/returns/{returnId}/item-identifiers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"externalIdentifier\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getredo.com/v2.2/stores/{storeId}/returns/{returnId}/item-identifiers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"externalIdentifier\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"return": {
"createdAt": "2023-11-07T05:31:56Z",
"destination": {
"mailingAddress": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"postalCode": "<string>",
"state": "<string>",
"line2": ""
},
"phoneNumber": "<string>"
},
"giftCards": [
{
"amount": {
"amount": "<string>",
"currency": "<string>"
},
"code": "<string>",
"externalId": "<string>"
}
],
"id": "<string>",
"items": [
{
"id": "<string>",
"orderItem": {
"id": "<string>",
"line_item_id": "<string>"
},
"quantity": 123,
"reason": "<string>",
"customerComment": "<string>",
"exchangeItem": {
"product": {
"externalId": "<string>",
"name": "<string>"
},
"quantity": 123,
"variant": {
"externalId": "<string>",
"name": "<string>"
}
},
"grade": "<string>",
"greenReturn": true,
"outcome": "<string>",
"shipmentGroupIds": [
"<string>"
],
"externalIdentifier": "<string>",
"externalReturnLineItemId": "<string>",
"productId": "<string>",
"reasonCode": "<string>",
"reasons": [
"<string>"
],
"reasonCodes": [
"<string>"
],
"productAdjustment": "<string>",
"multipleChoiceQuestions": [
{
"question": "<string>",
"answer": "<string>"
}
],
"assessments": [
{
"assignedUser": {
"id": "<string>",
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>"
},
"responses": [
{
"type": "<string>",
"value": "<string>"
}
]
}
],
"refund": {
"amount": {
"amount": "<string>",
"currency": "<string>"
},
"type": "<string>"
},
"productValueNoTaxNoAdjustment": {
"amount": {
"amount": "<string>",
"currency": "<string>"
}
},
"sku": "<string>",
"upc": "<string>",
"status": "<string>",
"variantId": "<string>"
}
],
"order": {
"id": "64e4da943dd822979a70bd12",
"name": "<string>"
},
"source": {
"emailAddress": "jsmith@example.com",
"mailingAddress": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"postalCode": "<string>",
"state": "<string>",
"line2": ""
},
"name": {
"given": "<string>",
"surname": "<string>"
},
"phoneNumber": "<string>"
},
"status": "open",
"updatedAt": "2023-11-07T05:31:56Z",
"compensationMethods": [],
"completeWithNoAction": true,
"exchange": {
"items": [
{
"id": "<string>",
"quantity": 1,
"variant": {
"name": "<string>",
"externalId": "<string>",
"sku": "<string>",
"weight": {
"kg": 1
}
},
"originalPrice": {
"amount": "<string>",
"currency": "<string>"
},
"price": {
"amount": "<string>",
"currency": "<string>",
"tax": "<string>"
},
"product": {
"name": "<string>",
"externalId": "<string>"
}
}
],
"provision": "deferred",
"itemCount": 123,
"order": {
"externalId": "<string>"
},
"totalTax": {
"amount": "<string>",
"currency": "<string>"
}
},
"externalOrderIds": [
"<string>"
],
"internalCreatedByName": "<string>",
"notes": [
{
"message": "<string>",
"image": "<string>"
}
],
"shipment": {
"carrier": "<string>",
"tracker": "<string>",
"trackingUrl": "<string>",
"postageLabel": "<string>",
"formLabel": "<string>",
"shipmentGroupId": "<string>",
"itemIds": [
"<string>"
],
"externalLocationId": "<string>",
"estimatedDeliveryDate": "<string>",
"deliveredAt": "<string>"
},
"shipments": [
{
"carrier": "<string>",
"tracker": "<string>",
"trackingUrl": "<string>",
"postageLabel": "<string>",
"formLabel": "<string>",
"shipmentGroupId": "<string>",
"itemIds": [
"<string>"
],
"externalLocationId": "<string>",
"estimatedDeliveryDate": "<string>",
"deliveredAt": "<string>"
}
],
"dropoffs": [
{
"shipmentGroupId": "<string>",
"provider": "<string>",
"qrCode": "<string>",
"qrCodeUrl": "<string>"
}
],
"shopifyOrderIds": [
"<string>"
],
"tags": [
{
"name": "<string>",
"source": "<string>"
}
],
"totals": {
"charge": {
"amount": {
"amount": "<string>",
"currency": "<string>"
}
},
"exchange": {
"amount": {
"amount": "<string>",
"currency": "<string>"
}
},
"refund": {
"amount": {
"amount": "<string>",
"currency": "<string>"
}
},
"storeCredit": {
"amount": {
"amount": "<string>",
"currency": "<string>"
}
}
},
"type": "return"
}
}{
"detail": "<string>",
"instance": "<string>",
"title": "<string>",
"type": "about:blank"
}{
"detail": "<string>",
"instance": "<string>",
"title": "<string>",
"type": "about:blank"
}{
"detail": "<string>",
"instance": "<string>",
"title": "<string>",
"type": "about:blank"
}Returns
Set Return Item Identifiers
Set merchant-supplied external identifiers on return items. Each entry in items matches a return item by its id and records the supplied externalIdentifier on it. The full return object is returned after the update.
Possible 400 problem types:
com.getredo.api:return/invalid-request— the request body is malformed.com.getredo.api:return/item-not-found— one or more item IDs supplied in the request do not exist on this return.
PUT
/
stores
/
{storeId}
/
returns
/
{returnId}
/
item-identifiers
Set Return Item Identifiers
curl --request PUT \
--url https://api.getredo.com/v2.2/stores/{storeId}/returns/{returnId}/item-identifiers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"externalIdentifier": "<string>",
"id": "<string>"
}
]
}
'import requests
url = "https://api.getredo.com/v2.2/stores/{storeId}/returns/{returnId}/item-identifiers"
payload = { "items": [
{
"externalIdentifier": "<string>",
"id": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({items: [{externalIdentifier: '<string>', id: '<string>'}]})
};
fetch('https://api.getredo.com/v2.2/stores/{storeId}/returns/{returnId}/item-identifiers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getredo.com/v2.2/stores/{storeId}/returns/{returnId}/item-identifiers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'externalIdentifier' => '<string>',
'id' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getredo.com/v2.2/stores/{storeId}/returns/{returnId}/item-identifiers"
payload := strings.NewReader("{\n \"items\": [\n {\n \"externalIdentifier\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.getredo.com/v2.2/stores/{storeId}/returns/{returnId}/item-identifiers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"externalIdentifier\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getredo.com/v2.2/stores/{storeId}/returns/{returnId}/item-identifiers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"externalIdentifier\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"return": {
"createdAt": "2023-11-07T05:31:56Z",
"destination": {
"mailingAddress": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"postalCode": "<string>",
"state": "<string>",
"line2": ""
},
"phoneNumber": "<string>"
},
"giftCards": [
{
"amount": {
"amount": "<string>",
"currency": "<string>"
},
"code": "<string>",
"externalId": "<string>"
}
],
"id": "<string>",
"items": [
{
"id": "<string>",
"orderItem": {
"id": "<string>",
"line_item_id": "<string>"
},
"quantity": 123,
"reason": "<string>",
"customerComment": "<string>",
"exchangeItem": {
"product": {
"externalId": "<string>",
"name": "<string>"
},
"quantity": 123,
"variant": {
"externalId": "<string>",
"name": "<string>"
}
},
"grade": "<string>",
"greenReturn": true,
"outcome": "<string>",
"shipmentGroupIds": [
"<string>"
],
"externalIdentifier": "<string>",
"externalReturnLineItemId": "<string>",
"productId": "<string>",
"reasonCode": "<string>",
"reasons": [
"<string>"
],
"reasonCodes": [
"<string>"
],
"productAdjustment": "<string>",
"multipleChoiceQuestions": [
{
"question": "<string>",
"answer": "<string>"
}
],
"assessments": [
{
"assignedUser": {
"id": "<string>",
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>"
},
"responses": [
{
"type": "<string>",
"value": "<string>"
}
]
}
],
"refund": {
"amount": {
"amount": "<string>",
"currency": "<string>"
},
"type": "<string>"
},
"productValueNoTaxNoAdjustment": {
"amount": {
"amount": "<string>",
"currency": "<string>"
}
},
"sku": "<string>",
"upc": "<string>",
"status": "<string>",
"variantId": "<string>"
}
],
"order": {
"id": "64e4da943dd822979a70bd12",
"name": "<string>"
},
"source": {
"emailAddress": "jsmith@example.com",
"mailingAddress": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"postalCode": "<string>",
"state": "<string>",
"line2": ""
},
"name": {
"given": "<string>",
"surname": "<string>"
},
"phoneNumber": "<string>"
},
"status": "open",
"updatedAt": "2023-11-07T05:31:56Z",
"compensationMethods": [],
"completeWithNoAction": true,
"exchange": {
"items": [
{
"id": "<string>",
"quantity": 1,
"variant": {
"name": "<string>",
"externalId": "<string>",
"sku": "<string>",
"weight": {
"kg": 1
}
},
"originalPrice": {
"amount": "<string>",
"currency": "<string>"
},
"price": {
"amount": "<string>",
"currency": "<string>",
"tax": "<string>"
},
"product": {
"name": "<string>",
"externalId": "<string>"
}
}
],
"provision": "deferred",
"itemCount": 123,
"order": {
"externalId": "<string>"
},
"totalTax": {
"amount": "<string>",
"currency": "<string>"
}
},
"externalOrderIds": [
"<string>"
],
"internalCreatedByName": "<string>",
"notes": [
{
"message": "<string>",
"image": "<string>"
}
],
"shipment": {
"carrier": "<string>",
"tracker": "<string>",
"trackingUrl": "<string>",
"postageLabel": "<string>",
"formLabel": "<string>",
"shipmentGroupId": "<string>",
"itemIds": [
"<string>"
],
"externalLocationId": "<string>",
"estimatedDeliveryDate": "<string>",
"deliveredAt": "<string>"
},
"shipments": [
{
"carrier": "<string>",
"tracker": "<string>",
"trackingUrl": "<string>",
"postageLabel": "<string>",
"formLabel": "<string>",
"shipmentGroupId": "<string>",
"itemIds": [
"<string>"
],
"externalLocationId": "<string>",
"estimatedDeliveryDate": "<string>",
"deliveredAt": "<string>"
}
],
"dropoffs": [
{
"shipmentGroupId": "<string>",
"provider": "<string>",
"qrCode": "<string>",
"qrCodeUrl": "<string>"
}
],
"shopifyOrderIds": [
"<string>"
],
"tags": [
{
"name": "<string>",
"source": "<string>"
}
],
"totals": {
"charge": {
"amount": {
"amount": "<string>",
"currency": "<string>"
}
},
"exchange": {
"amount": {
"amount": "<string>",
"currency": "<string>"
}
},
"refund": {
"amount": {
"amount": "<string>",
"currency": "<string>"
}
},
"storeCredit": {
"amount": {
"amount": "<string>",
"currency": "<string>"
}
}
},
"type": "return"
}
}{
"detail": "<string>",
"instance": "<string>",
"title": "<string>",
"type": "about:blank"
}{
"detail": "<string>",
"instance": "<string>",
"title": "<string>",
"type": "about:blank"
}{
"detail": "<string>",
"instance": "<string>",
"title": "<string>",
"type": "about:blank"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Store ID
Example:
"64e5a8a1af49a89df37e4ee7"
Return ID
Example:
"64e4d5e837572a4813b73e40"
Body
application/json
Request body for setting external identifiers on return items.
List of return items to update. Each entry must include the return item id and the externalIdentifier to assign to it.
Show child attributes
Show child attributes
Response
Success
Return read.
Show child attributes
Show child attributes
Was this page helpful?
⌘I