List Returns
Retrieve a list of all order returns.
ending_before
The ID of the order created after the last order you want to retrieve a return from.
limit
The maximum number of returns to list. Range: 1-100.
10
starting_after
The ID of the order created before the first order you want to retrieve a return from.
Code Samples
.NET
using System; namespace RapydApiRequestSample { class Program { static void Main(string[] args) { try { string result = RapydApiRequestSample.Utilities.MakeRequest("GET", $"/v1/order_returns"); Console.WriteLine(result); } catch (Exception e) { Console.WriteLine("Error completing request: " + e.Message); } } } }
JavaScript
const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest; async function main() { try { const result = await makeRequest('GET', '/v1/order_returns'); console.log(result); } catch (error) { console.error('Error completing request', error); } }
PHP
<?php $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/<path-to-your-utility-file>/utilities.php"; include($path); try { $object = make_request('get', '/v1/order_returns'); var_dump($object); } catch(Exception $e) { echo "Error: $e"; } ?>
Python
from pprint import pprint from utilities import make_request result = make_request(method='get', path='/v1/order_returns') pprint(result)
/v1/order_returns
List Returns
curl -X get 'https://sandboxapi.rapyd.net/v1/order_returns?limit=3' \ -H 'access_key: your-access-key-here' \ -H 'Content-Type: application/json' \ -H 'salt: your-random-string-here' \ -H 'signature: your-calculated-signature-here' \ -H 'timestamp: your-unix-timestamp-here'
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "b4e61692-0cbd-482b-80f8-fafd74e1d8ee" }, "data": [ { "id": "orre_8772f02783e103c39047ef34e7b4dab0", "amount": 50, "created": 1763534194, "currency": "USD", "items": [ { "amount": 50, "currency": "USD", "description": 0, "parent": "sku_6eb43887fd478baaf9223ec7ec17da21", "quantity": 1, "type": "sku" } ], "order": "order_07f883eacb9bc126a60d7e147a58e057", "refund": "refund_4f4a3f3a758fa0f5e61b57aafc7c9e87" }, { "id": "orre_fe2862c09fc342b222589ca9e4fef766", "amount": 50, "created": 1672665882, "currency": "USD", "items": [ { "amount": 50, "currency": "USD", "description": 0, "parent": "sku_d0b8f03208cf2b406cca3e59a362691c", "quantity": 1, "type": "sku" } ], "order": "order_3fe4ed8e5f6d1678d8847833942ca4bf", "refund": "refund_05a833074e5f1659694fd8413fa776a3" }, { "id": "orre_f38559ea951c5b8c41dc0feb3ea9f36d", "amount": 200, "created": 1667994892, "currency": "USD", "items": [ { "amount": 200, "currency": "USD", "description": 0, "parent": "sku_d0b8f03208cf2b406cca3e59a362691c", "quantity": 1, "type": "sku" } ], "order": "order_3fe4ed8e5f6d1678d8847833942ca4bf", "refund": "refund_589cd67c171c461cbe6d733705badf51" } ] }