MENU navbar-image

Introduction

Welcome to the API documentation for Device Rescue. Our API provides a robust, secure, and efficient way to interact with endpoints to manage your account, submit retrieval requests and more.

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can create your Personal Access Token by visiting your profile and clicking Options > Create Token.

Device Retrievals

Create a new retrieval

requires authentication

This endpoint allows you to create a new retrieval requests for your employee.
You can specify whether to use the primary shipping information located in your company settings for the return location information, or provide a new address.

Product IDs: 1 for Laptop, 2 for Monitor, 3 for Tablet, 4 for Cellphone.
Insurance Option IDs: 0 for No Shipping Insurance, 1 for $1,000, 2 for $2,000, 3 for $3,000.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.devicerescue.com/api/v1/new-retrieval';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'mode' => 'test',
            'productID' => 1,
            'insurance_option' => 1,
            'employee_name' => 'John Doe',
            'employee_email' => '[email protected]',
            'employee_phone' => '1234567890',
            'employee_address_line1' => '123 Main St',
            'employee_address_line2' => 'Apartment 4',
            'employee_city' => 'New York',
            'employee_state' => 'NY',
            'employee_zip' => '10001',
            'use_primary_address' => false,
            'return_name' => 'Jane Smith',
            'return_email' => '[email protected]',
            'return_phone' => '0987654321',
            'return_address_line1' => '456 Elm Street',
            'return_address_line2' => 'Suite 5',
            'return_city' => 'Los Angeles',
            'return_state' => 'CA',
            'return_zip' => '90001',
            'company_is_residential' => false,
            'note' => 'Please do not send until 12-1-2023.',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://app.devicerescue.com/api/v1/new-retrieval" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mode\": \"test\",
    \"productID\": 1,
    \"insurance_option\": 1,
    \"employee_name\": \"John Doe\",
    \"employee_email\": \"[email protected]\",
    \"employee_phone\": \"1234567890\",
    \"employee_address_line1\": \"123 Main St\",
    \"employee_address_line2\": \"Apartment 4\",
    \"employee_city\": \"New York\",
    \"employee_state\": \"NY\",
    \"employee_zip\": \"10001\",
    \"use_primary_address\": false,
    \"return_name\": \"Jane Smith\",
    \"return_email\": \"[email protected]\",
    \"return_phone\": \"0987654321\",
    \"return_address_line1\": \"456 Elm Street\",
    \"return_address_line2\": \"Suite 5\",
    \"return_city\": \"Los Angeles\",
    \"return_state\": \"CA\",
    \"return_zip\": \"90001\",
    \"company_is_residential\": false,
    \"note\": \"Please do not send until 12-1-2023.\"
}"
const url = new URL(
    "https://app.devicerescue.com/api/v1/new-retrieval"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "mode": "test",
    "productID": 1,
    "insurance_option": 1,
    "employee_name": "John Doe",
    "employee_email": "[email protected]",
    "employee_phone": "1234567890",
    "employee_address_line1": "123 Main St",
    "employee_address_line2": "Apartment 4",
    "employee_city": "New York",
    "employee_state": "NY",
    "employee_zip": "10001",
    "use_primary_address": false,
    "return_name": "Jane Smith",
    "return_email": "[email protected]",
    "return_phone": "0987654321",
    "return_address_line1": "456 Elm Street",
    "return_address_line2": "Suite 5",
    "return_city": "Los Angeles",
    "return_state": "CA",
    "return_zip": "90001",
    "company_is_residential": false,
    "note": "Please do not send until 12-1-2023."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (202, Accepted):


{
    "Message": "Success",
    "Retrieval ID": 2355
}
 

Example response (402, Payment Required):


{
    "Error": "Unable to reduce credit amount from your account or charge your default card on file."
}
 

Example response (405, Method Not Allowed):


{
  "Error": "Invalid mode - Please declare if it is production [prod] or test [test]."
}
  }
}
 

Example response (422, validation error):


{
  "Message": "The given data was invalid.",
  "errors": {
    "productID": ["The product id field is required."],
    // Other validation errors
  }
 

Example response (426, Upgrade Required):


{
    "Message": "Your subscription does not allow access to this resource. Please upgrade your plan to utilize API resources."
}
 

Request   

POST api/v1/new-retrieval

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

mode   string   

Specify if this is prod or test. Example: test

productID   integer   

The ID of the product. Example: 1

insurance_option   integer   

The insurance option. Example: 1

employee_name   string   

Name of the employee. Example: John Doe

employee_email   string   

Email of the employee. Example: [email protected]

employee_phone   string   

Phone number of the employee. Example: 1234567890

employee_address_line1   string   

Address line 1 of the employee. Example: 123 Main St

employee_address_line2   string  optional  

Address line 2 of the employee. Example: Apartment 4

employee_city   string   

City of the employee. Example: New York

employee_state   string   

State of the employee. Example: NY

employee_zip   string   

Zip code of the employee. Example: 10001

use_primary_address   boolean   

Whether to use the company's primary address within your company settings. If false, you will need to provide a return address. Example: false

return_name   string  optional  

Name for the return. Required if use_primary_address is false. Example: Jane Smith

return_email   string  optional  

Email for the return. Required if use_primary_address is false. Example: [email protected]

return_phone   string  optional  

Phone number for the return. Required if use_primary_address is false. Example: 0987654321

return_address_line1   string  optional  

Address line 1 for the return. Required if use_primary_address is false. Example: 456 Elm Street

return_address_line2   string  optional  

Address line 2 for the return. Example: Suite 5

return_city   string  optional  

City for the return. Required if use_primary_address is false. Example: Los Angeles

return_state   string  optional  

State for the return. Required if use_primary_address is false. Example: CA

return_zip   string  optional  

Zip code for the return. Required if use_primary_address is false. Example: 90001

company_is_residential   boolean  optional  

Whether the company address is residential. Example: false

note   string  optional  

Optional note about the return. Example: Please do not send until 12-1-2023.

Get All Retrievals

requires authentication

This endpoint allows you to fetch all your retrievals in your account.
Results will show 15 per page.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.devicerescue.com/api/v1/retrievals';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://app.devicerescue.com/api/v1/retrievals" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"page\": \"1\"
}"
const url = new URL(
    "https://app.devicerescue.com/api/v1/retrievals"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "page": "1"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, OK):


{
    "current_page": 1,
    "data": [
        {}
    ],
    "first_page_url": "https://app.devicerescue.io/api/v1/retrievals?page=1",
    "from": 1,
    "last_page": 3,
    "last_page_url": "https://app.devicerescue.io/api/v1/retrievals?page=3",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://app.devicerescue.io/api/v1/retrievals?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": "https://app.devicerescue.io/api/v1/retrievals?page=2",
            "label": "2",
            "active": false
        },
        {
            "url": "https://app.devicerescue.io/api/v1/retrievals?page=3",
            "label": "3",
            "active": false
        }
    ],
    "next_page_url": "https://app.devicerescue.io/api/v1/retrievals?page=2",
    "path": "https://app.devicerescue.io/api/v1/retrievals",
    "per_page": 15,
    "prev_page_url": null,
    "to": 15,
    "total": 42
}
 

Example response (426, Upgrade Required):


{
  "Message": "Your subscription does not allow access to this resource. Please upgrade your plan to utilize API resources."
}
  }
}
 

Request   

GET api/v1/retrievals

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

page   string  optional  

Enter the page number you'd like to view. Example: 1

Get Retrieval Information

requires authentication

This endpoint allows you to view your retrieval details along with shipping status.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.devicerescue.com/api/v1/retrieval';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'retrieval_id' => '1867',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://app.devicerescue.com/api/v1/retrieval" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"retrieval_id\": \"1867\"
}"
const url = new URL(
    "https://app.devicerescue.com/api/v1/retrieval"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "retrieval_id": "1867"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, OK):


{
  "retrievalID": 1867,
  "retrieval_box": 4,
  "employee_name": "Tyler Retrieve",
  "employee_email": "[email protected]",
  "employee_phone": "(871) 239-0019",
  "employee_address_line1": "123 tester Ave",
  "employee_address_line2": "Unit 3",
  "employee_city": "Athol",
  "employee_state": "VT",
  "employee_zip": "82341",
  "carrier": FedEx,
  "ship_date": 06/09/2023,
  "tracking_number": 794644565444,
  "tracking_url": https://track.easypost.com/djE6dHJrX2Q1MzY2OThjYzNlMzQ3NTE5ZDc4YjVjNzM2OTNiY2Mw,
  "shipping_status": "delivered",
  "delivery_date_to_employee": 06/12/2023,
  "return_name": "Tyler Okland",
  "return_email": "[email protected]",
  "return_phone": "(877) 418-2088",
  "return_address_line1": "784 S Clearwater Loop",
  "return_address_line2": "STE 5250",
  "return_city": "Post Falls",
  "return_state": "ID",
  "return_zip": "83854",
  "company_is_residential": 0,
  "return_carrier": FedEx,
  "return_tracking_number": 794644565341,
  "return_tracking_url": https://track.easypost.com/djE6dHJrX2NkZjUyNzcyODg3ODQ0MDg5ODMyYjAxNWJlZTdiNzZl,
  "return_shipping_status": "pre_transit",
  "return_delivery_date": 06/12/2023,
  "insurance_option": "No Shipping Insurance",
  "device": "e73ec4e5-f4a9-4093-ac33-64209681355e",
  "created_by": 62,
  "created_at": "2023-12-16T06:10:01.000000Z",
  "updated_at": "12/17/23 05:27 AM"
}
 

Example response (401, Unauthorized):


{
    "message": "Unauthenticated."
}
 

Example response (404, Not Found):


{
    "message": "Retrieval not found"
}
 

Example response (412, Precondition Failed):


{
   "message": "Invalid retrieval ID"
}
  }
}
 

Example response (426, Upgrade Required):


{
    "Message": "Your subscription does not allow access to this resource. Please upgrade your plan to utilize API resources."
}
 

Request   

GET api/v1/retrieval

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

retrieval_id   string   

Enter the Retrieval ID or Confirmation number of the retrieval you'd like to view. Example: 1867

Resellers

APIs for managing reseller operations. To utilize these api calls, you must be registered as an Authorized Reseller for Device Rescue.

GET All Retrieval Products

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.devicerescue.com/api/reseller/products';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'mode' => 'test. Allowed values: test, production',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://app.devicerescue.com/api/reseller/products" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mode\": \"test. Allowed values: test, production\"
}"
const url = new URL(
    "https://app.devicerescue.com/api/reseller/products"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "mode": "test. Allowed values: test, production"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{

 "retrieval_type_id": 1,
    "name": "Laptop",
    "description": This padded laptop box is shipped to your employee with a prepaid self-stick return label, easy packing / shipping instructions, and tape. Padded laptop box fits most laptops up to 16″ and charger (or other charger-sized accessories) in the appropriate tray. Please be aware, minimum supported device dimensions: 11″ x 7″ x 0.5″ and maximum supported device dimensions are 15.125″ x 10.25″ x 1″. Accessories tray dimensions: 15.75″ x 3.5″ x 1.5″ (accessories tray is not padded).,
    "featured_image": https://devicerescue-production.s3.amazonaws.com/20231005191503/epe-laptop-box-device-rescue-min.jpeg,
    "dimensions": {
       "length": 18,
       "width": 12,
       "height": 4
     },
     "pricing": {
        "msrp": "89.00",
        "reseller_cost": "REDACTED"
      }
 }
 

Request   

GET api/reseller/products

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

mode   required  optional  

The mode of operation passed in the request body. Example: test. Allowed values: test, production

GET All Insurance Options

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.devicerescue.com/api/reseller/insurance-options';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'mode' => 'test. Allowed values: test, production',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://app.devicerescue.com/api/reseller/insurance-options" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mode\": \"test. Allowed values: test, production\"
}"
const url = new URL(
    "https://app.devicerescue.com/api/reseller/insurance-options"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "mode": "test. Allowed values: test, production"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "insurance_type_id": 1,
    "name": "No Shipping Insurance",
    "is_popular": false,
    "pricing": {
        "msrp": 0,
        "reseller_cost": 0
    }
}
 

Request   

GET api/reseller/insurance-options

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

mode   required  optional  

The mode of operation passed in the request body. Example: test. Allowed values: test, production

GET All Carrier Options

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.devicerescue.com/api/reseller/carrier-options';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'mode' => 'test. Allowed values: test, production',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://app.devicerescue.com/api/reseller/carrier-options" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mode\": \"test. Allowed values: test, production\"
}"
const url = new URL(
    "https://app.devicerescue.com/api/reseller/carrier-options"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "mode": "test. Allowed values: test, production"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "carrier_type_id": 1,
    "name": "USPS",
    "retrieval_product": "Laptop",
    "description": "Your employee will receive the delivery within 2-5 business days. Once your employee ships the device back, it will take an additional 2-5 business days to reach your provided address.",
    "pricing": {
        "msrp": 0,
        "reseller_cost": 0
    }
}
 

Request   

GET api/reseller/carrier-options

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

mode   required  optional  

The mode of operation passed in the request body. Example: test. Allowed values: test, production

GET All Retrieval History

requires authentication

Retrieve all retrieval histories associated with the authenticated reseller.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.devicerescue.com/api/reseller/retrieval-history';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'mode' => 'test. Allowed values: test, production',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://app.devicerescue.com/api/reseller/retrieval-history" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mode\": \"test. Allowed values: test, production\"
}"
const url = new URL(
    "https://app.devicerescue.com/api/reseller/retrieval-history"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "mode": "test. Allowed values: test, production"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 123,
            "retrieval_type": "Tablet",
            "admin_status": null,
            "merged_into": null,
            "origin": {
                "full_name": "John Doe",
                "phone": "1234567890",
                "email": "[email protected]",
                "address": {
                    "line1": "123 Main St",
                    "line2": "Suite 101",
                    "city": "Metropolis",
                    "state": "NY",
                    "zip": "10101"
                },
                "shipment_status": "awaiting_shipment",
                "carrier": null,
                "carrier_service": "Priority",
                "tracking_url": null,
                "tracking_number": null,
                "shipped_date": null,
                "delivered_date": null
            },
            "destination": {
                "company": "Example Corp",
                "attn_name": "Jane Smith",
                "phone": "0987654321",
                "email": "[email protected]",
                "address": {
                    "line1": "456 Elm St",
                    "line2": "Apt 202",
                    "city": "Gotham",
                    "state": "CA",
                    "zip": "20202",
                    "is_residential": true
                },
                "shipment_status": "awaiting_shipment",
                "carrier": null,
                "carrier_service": "Priority",
                "tracking_url": null,
                "tracking_number": null,
                "delivered_date": null
            },
            "insurance": {
                "option": "No Shipping Insurance"
            },
            "created_at": "2024-04-28 23:21:30",
            "updated_at": "04/28/24 11:21 PM"
        },
    ],
    "links": {
        "first": "https://app.devicerescue.com/api/reseller/retrieval-history?page=1",
        "last": "https://app.devicerescue.com/api/reseller/retrieval-history?page=5",
        "prev": null,
        "next": "https://app.devicerescue.com/api/reseller/retrieval-history?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 5,
        "path": "https://app.devicerescue.com/api/reseller/retrieval-history",
        "per_page": 10,
        "to": 10,
        "total": 50
    }
}
 

Example response (403):


{
    "message": "Unauthorized action."
}
 

Example response (404):


{
    "message": "No associated reseller found."
}
 

Request   

GET api/reseller/retrieval-history

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

mode   required  optional  

The mode of operation passed in the request body. Example: test. Allowed values: test, production

GET Retrieval History

requires authentication

Retrieve a specific retrieval history associated with the authenticated reseller by passing the retrieval_id.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.devicerescue.com/api/reseller/retrieval-history/1267';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'mode' => 'test. Allowed values: test, production',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://app.devicerescue.com/api/reseller/retrieval-history/1267" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mode\": \"test. Allowed values: test, production\"
}"
const url = new URL(
    "https://app.devicerescue.com/api/reseller/retrieval-history/1267"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "mode": "test. Allowed values: test, production"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 1267,
        "retrieval_type": "Tablet",
        "admin_status": null,
        "merged_into": null,
        "origin": {
            "full_name": "John Doe",
            "phone": "1234567890",
            "email": "[email protected]",
            "address": {
                "line1": "123 Main St",
                "line2": "Suite 101",
                "city": "Metropolis",
                "state": "NY",
                "zip": "10101"
            },
            "shipment_status": null,
            "carrier": null,
            "carrier_service": "Priority",
            "tracking_url": null,
            "tracking_number": null,
            "shipped_date": null,
            "delivered_date": null
        },
        "destination": {
            "company": "Example Corp",
            "attn_name": "Jane Smith",
            "phone": "0987654321",
            "email": "[email protected]",
            "address": {
                "line1": "456 Elm St",
                "line2": "Apt 202",
                "city": "Gotham",
                "state": "CA",
                "zip": "20202",
                "is_residential": true
            },
            "shipment_status": null,
            "carrier": null,
            "carrier_service": "Priority",
            "tracking_url": null,
            "tracking_number": null,
            "delivered_date": null
        },
        "insurance": {
            "option": "No Shipping Insurance"
        },
        "created_at": "2024-04-28 23:22:51",
        "updated_at": "04/28/24 11:22 PM"
    }
}
 

Example response (403):


{
    "message": "Unauthorized action."
}
 

Example response (404):


{
    "message": "No associated reseller found."
}
 

Example response (404):


{
    "message": "Retrieval history not found."
}
 

Request   

GET api/reseller/retrieval-history/{retrieval_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

retrieval_id   string   

The ID of the retrieval history. Example: 1267

Body Parameters

mode   required  optional  

The mode of operation passed in the request body. Example: test. Allowed values: test, production

PATCH Retrieval Request

requires authentication

This endpoint allows for the modification of retrieval history details associated with a given retrieval_id aka confirmation number. The request must specify the mode ('test' or 'production') and provide detailed information about both the origin and the destination. Updates can only be made if shipping labels have not yet been generated. Device Rescue typically generates shipping labels within one hour of receiving retrieval requests, in preparation for same-day or next business day carrier pickups. Webhooks can be set up to receive notifications. When information is updated, webhooks will be triggered, sending out the updated information.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.devicerescue.com/api/reseller/retrieval-history/12345';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'mode' => 'test',
            'origin' => [
                'full_name' => 'John Doe',
                'phone_number' => '1234567890',
                'email' => '[email protected]',
                'address' => [
                    'line_1' => '123 Main St',
                    'line_2' => 'Apt 4',
                    'city' => 'New York',
                    'state' => 'NY',
                    'zipcode' => '10001',
                ],
            ],
            'destination' => [
                'company' => 'Example Inc',
                'attn_name' => 'Jane Doe',
                'phone_number' => '0987654321',
                'email' => '[email protected]',
                'address' => [
                    'line_1' => '456 Elm St',
                    'line_2' => 'Suite 5',
                    'city' => 'Chicago',
                    'state' => 'IL',
                    'zipcode' => '60601',
                    'is_residential' => true,
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PATCH \
    "https://app.devicerescue.com/api/reseller/retrieval-history/12345" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mode\": \"test\",
    \"origin\": {
        \"full_name\": \"John Doe\",
        \"phone_number\": \"1234567890\",
        \"email\": \"[email protected]\",
        \"address\": {
            \"line_1\": \"123 Main St\",
            \"line_2\": \"Apt 4\",
            \"city\": \"New York\",
            \"state\": \"NY\",
            \"zipcode\": \"10001\"
        }
    },
    \"destination\": {
        \"company\": \"Example Inc\",
        \"attn_name\": \"Jane Doe\",
        \"phone_number\": \"0987654321\",
        \"email\": \"[email protected]\",
        \"address\": {
            \"line_1\": \"456 Elm St\",
            \"line_2\": \"Suite 5\",
            \"city\": \"Chicago\",
            \"state\": \"IL\",
            \"zipcode\": \"60601\",
            \"is_residential\": true
        }
    }
}"
const url = new URL(
    "https://app.devicerescue.com/api/reseller/retrieval-history/12345"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "mode": "test",
    "origin": {
        "full_name": "John Doe",
        "phone_number": "1234567890",
        "email": "[email protected]",
        "address": {
            "line_1": "123 Main St",
            "line_2": "Apt 4",
            "city": "New York",
            "state": "NY",
            "zipcode": "10001"
        }
    },
    "destination": {
        "company": "Example Inc",
        "attn_name": "Jane Doe",
        "phone_number": "0987654321",
        "email": "[email protected]",
        "address": {
            "line_1": "456 Elm St",
            "line_2": "Suite 5",
            "city": "Chicago",
            "state": "IL",
            "zipcode": "60601",
            "is_residential": true
        }
    }
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


{
 "retrieval_id": "12345"
 "message": "Retrieval information updated for this request. If you have webhooks setup, we'll send a webhook with the updated information",
}
 

Example response (404, not found):


{
    "message": "Retrieval history not found. Please check the retrieval ID and try again."
}
 

Example response (409, conflict):


{
    "message": "Cannot update retrieval information. We have already generated shipping labels for this retrieval."
}
 

Request   

PATCH api/reseller/retrieval-history/{retrieval_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

retrieval_id   string   

The ID of the retrieval history to update. Example: 12345

Body Parameters

mode   string   

The mode of the retrieval history, either 'test' or 'production'. Example: test

origin   object  optional  
full_name   string   

Full name at the origin. Example: John Doe

phone_number   string   

Phone number at the origin, must be 10 digits. Example: 1234567890

email   email   

Email address at the origin. Example: [email protected]

address   object  optional  
line_1   string   

Primary address line at the origin. Example: 123 Main St

line_2   string  optional  

optional Secondary address line at the origin. Example: Apt 4

city   string   

City of the origin address. Example: New York

state   string   

State of the origin address, must be 2 characters. Example: NY

zipcode   string   

ZIP code of the origin address, must be 5 digits. Example: 10001

destination   object  optional  
company   string   

Company name at the destination. Example: Example Inc

attn_name   string   

Attention to name at the destination. Example: Jane Doe

phone_number   string   

Phone number at the destination, must be 10 digits. Example: 0987654321

email   email   

Email address at the destination. Example: [email protected]

address   object  optional  
line_1   string   

Primary address line at the destination. Example: 456 Elm St

line_2   string  optional  

optional Secondary address line at the destination. Example: Suite 5

city   string   

City of the destination address. Example: Chicago

state   string   

State of the destination address, must be 2 characters. Example: IL

zipcode   string   

ZIP code of the destination address, must be 5 digits. Example: 60601

is_residential   boolean   

Indicates whether the destination address is residential. Example: true

POST Create New Retrieval

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.devicerescue.com/api/reseller/create/retrieval';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'retrieval_type_id' => 1,
            'insurance_type_id' => 1,
            'carrier_service' => 1,
            'origin' => [
                'full_name' => 'John Doe',
                'phone_number' => '1234567890',
                'email' => '[email protected]',
                'address' => [
                    'line_1' => '123 Main St',
                    'line_2' => 'Apt 101',
                    'city' => 'New York',
                    'state' => 'NY',
                    'zipcode' => '10001',
                ],
            ],
            'destination' => [
                'company' => 'ABC Corp',
                'attn_name' => 'Jane Smith',
                'phone_number' => '9876543210',
                'email' => '[email protected]',
                'address' => [
                    'line_1' => '456 Park Ave',
                    'line_2' => 'Suite 200',
                    'city' => 'Los Angeles',
                    'state' => 'CA',
                    'zipcode' => '90001',
                    'is_residential' => true,
                ],
            ],
            'mode' => 'test. Allowed values: test, production',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://app.devicerescue.com/api/reseller/create/retrieval" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"retrieval_type_id\": 1,
    \"insurance_type_id\": 1,
    \"carrier_service\": 1,
    \"origin\": {
        \"full_name\": \"John Doe\",
        \"phone_number\": \"1234567890\",
        \"email\": \"[email protected]\",
        \"address\": {
            \"line_1\": \"123 Main St\",
            \"line_2\": \"Apt 101\",
            \"city\": \"New York\",
            \"state\": \"NY\",
            \"zipcode\": \"10001\"
        }
    },
    \"destination\": {
        \"company\": \"ABC Corp\",
        \"attn_name\": \"Jane Smith\",
        \"phone_number\": \"9876543210\",
        \"email\": \"[email protected]\",
        \"address\": {
            \"line_1\": \"456 Park Ave\",
            \"line_2\": \"Suite 200\",
            \"city\": \"Los Angeles\",
            \"state\": \"CA\",
            \"zipcode\": \"90001\",
            \"is_residential\": true
        }
    },
    \"mode\": \"test. Allowed values: test, production\"
}"
const url = new URL(
    "https://app.devicerescue.com/api/reseller/create/retrieval"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "retrieval_type_id": 1,
    "insurance_type_id": 1,
    "carrier_service": 1,
    "origin": {
        "full_name": "John Doe",
        "phone_number": "1234567890",
        "email": "[email protected]",
        "address": {
            "line_1": "123 Main St",
            "line_2": "Apt 101",
            "city": "New York",
            "state": "NY",
            "zipcode": "10001"
        }
    },
    "destination": {
        "company": "ABC Corp",
        "attn_name": "Jane Smith",
        "phone_number": "9876543210",
        "email": "[email protected]",
        "address": {
            "line_1": "456 Park Ave",
            "line_2": "Suite 200",
            "city": "Los Angeles",
            "state": "CA",
            "zipcode": "90001",
            "is_residential": true
        }
    },
    "mode": "test. Allowed values: test, production"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "retrieval_id": 2017,
    "message": "Retrieval successfully submitted, we'll begin processing this within 1 business day."
}
 

Example response (402):


{
    "message": "Transaction Declined: Unable to deduct amount from your wallet balance."
}
 

Request   

POST api/reseller/create/retrieval

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

retrieval_type_id   integer   

The ID of the retrieval type. Example: 1

insurance_type_id   integer   

The ID of the insurance option. Example: 1

carrier_service   integer   

The ID of the carrier service. Example: 1

origin   object  optional  
full_name   string   

The full name of the origin. Example: John Doe

phone_number   string   

The phone number of the origin. Example: 1234567890

email   string   

The email of the origin. Example: [email protected]

address   object  optional  
line_1   string   

The address line 1 of the origin. Example: 123 Main St

line_2   string   

The address line 2 of the origin. Example: Apt 101

city   string   

The city of the origin. Example: New York

state   string   

The state of the origin. Example: NY

zipcode   string   

The zipcode of the origin. Example: 10001

destination   object  optional  
company   string   

The company name of the destination. Example: ABC Corp

attn_name   string   

The attention name of the destination. Example: Jane Smith

phone_number   string   

The phone number of the destination. Example: 9876543210

email   string   

The email of the destination. Example: [email protected]

address   object  optional  
line_1   string   

The address line 1 of the destination. Example: 456 Park Ave

line_2   string   

The address line 2 of the destination. Example: Suite 200

city   string   

The city of the destination. Example: Los Angeles

state   string   

The state of the destination. Example: CA

zipcode   string   

The zipcode of the destination. Example: 90001

is_residential   boolean   

Whether the destination is residential. Example: true

mode   required  optional  

The mode of operation passed in the request body. Example: test. Allowed values: test, production

GET Fetch Notes

requires authentication

Allows you to fetch notes for retrievals for a specific retrieval_id.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.devicerescue.com/api/reseller/retrieval/notes/1267';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'mode' => 'test. Allowed values: test, production',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://app.devicerescue.com/api/reseller/retrieval/notes/1267" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mode\": \"test. Allowed values: test, production\"
}"
const url = new URL(
    "https://app.devicerescue.com/api/reseller/retrieval/notes/1267"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "mode": "test. Allowed values: test, production"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "note": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
            "added_by": "Device Rescue",
            "created_at": "2024-04-28 23:23:06"
        },
        {
            "id": 2,
            "note": "Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
            "added_by": "Device Rescue",
            "created_at": "2024-04-28 23:23:06"
        },
    ],
    "links": {
        "first": "https://app.devicerescue.com/api/reseller/retrieval/notes/1267?page=1",
        "last": "https://app.devicerescue.com/api/reseller/retrieval/notes/1267?page=2",
        "prev": null,
        "next": "https://app.devicerescue.com/api/reseller/retrieval/notes/1267?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 2,
        "path": "https://app.devicerescue.com/api/reseller/retrieval/notes/1267",
        "per_page": 10,
        "to": 10,
        "total": 15
    }
}
 

Example response (403):


{
    "message": "Unauthorized action."
}
 

Example response (404):


{
    "message": "No associated reseller found."
}
 

Example response (404):


{
    "message": "No notes found for the specified retrieval ID."
}
 

Request   

GET api/reseller/retrieval/notes/{retrieval_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

retrieval_id   string   

The ID of the retrieval history. Example: 1267

Body Parameters

mode   required  optional  

The mode of operation passed in the request body. Example: test. Allowed values: test, production

POST Create Retrieval Note

requires authentication

Allows you to create a new note on your retrivals submitted to us.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.devicerescue.com/api/reseller/retrieval/notes/illum';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'mode' => 'test. Allowed values: test, production',
            'note' => 'Hello World.',
            'added_by' => 'John Smith.',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://app.devicerescue.com/api/reseller/retrieval/notes/illum" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mode\": \"test. Allowed values: test, production\",
    \"note\": \"Hello World.\",
    \"added_by\": \"John Smith.\"
}"
const url = new URL(
    "https://app.devicerescue.com/api/reseller/retrieval/notes/illum"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "mode": "test. Allowed values: test, production",
    "note": "Hello World.",
    "added_by": "John Smith."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "id": 1,
    "name": "Hello World!",
    "added_by": "Device Rescue",
    "created_at": "2024-04-29 00:12:03"
}
 

Request   

POST api/reseller/retrieval/notes/{retrieval_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

retrieval_id   string   

The ID of the retrieval. Example: illum

Body Parameters

mode   required  optional  

The mode of operation passed in the request body. Example: test. Allowed values: test, production

note   required  optional  

The note you would like to add to the retrieval. Example: Hello World.

added_by   required  optional  

The name of the person or entity that added the note. Example: John Smith.