Skip to main content

Documentation

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
    -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": "b0d2e4ac-5f97-4ac1-bb47-9571fe16e60c"
        },
        "data": [
            {
                "id": "orre_1bf55355a9334d702be0309e00e75ad4",
                "amount": 5,
                "created": 1597758667,
                "currency": "USD",
                "items": [
                    {
                        "amount": 5,
                        "currency": "USD",
                        "description": 0,
                        "parent": "sku_7e7818cd3cb7c33c194bc278b5c51c88",
                        "quantity": 1,
                        "type": "sku"
                    }
                ],
                "order": "order_ad4cea80c36e3469330c82c44a7b0362",
                "refund": "refund_2dbd966149fc1c92c273ef6e9ac0fb21"
            }
        ]
    }