/returns

Last modified October 5, 2018

This article applies to Contextual Commerce. (Looking for Classic Commerce documentation?)

Returns

Use this endpoint to retrieve return details.  Read more about Returns.

Get one or multiple returns

GET /returns/{id1}[,{id2},{id3},...]

Get products by id response
{
	"returns": [
	{
		"return": "QpMoe70PT5mMb5OMT4N5lA",                             // return ID
		"reference": "SUD160811-6921-74128X",                           // customer-facing return refernce (not the original order reference)
		"completed": true,                                              // false if return is pending
		"changed": 1470953997043,                                       // date of the last update to this return record, in milliseconds
		"changedValue": 1470953997043,
		"changedInSeconds": 1470953997,                                 // date of the last update to this return record, in seconds
		"changedDisplay": "8/11/16",                                    // date of the lsat update to this return record, formatted for display based on the language in which the order was processed, as selected by the customer
		"live": false,                                                  // true if not a test order
		"account": "_sOMzG2pSIyAeWXkcoNgUA",                            // FastSpring-generated customer account ID
		"currency": "USD",
		"payoutCurrency": "USD",
		"totalReturn": 10.0,
		"totalReturnDisplay": "$10.00",
		"totalReturnInPayoutCurrency": 10.0,
		"totalReturnInPayoutCurrencyDisplay": "$10.00",
		"tax": 0.0,
		"taxDisplay": "$0.00",
		"taxInPayoutCurrency": 0.0,
		"taxInPayoutCurrencyDisplay": "$0.00",
		"subtotal": 10.0,
		"subtotalDisplay": "$10.00",
		"subtotalInPayoutCurrency": 10.0,
		"subtotalInPayoutCurrencyDisplay": "$10.00",
		"totalRefundInPayoutCurrency": 10.0,
		"payment": {
			"type": "test",
			"cardEnding": "4242"
		},
		"reason": "Product Not Received",                                // return reason selected by publisher / seller when processing the refund
		"note": "Note during the refund of the order(Canceling The Subscription)",     // optional return comment entered by publisher / seller when processing the refund
		"original": {
			"id": "embMdXyCQZinGxkk2v85GA", 
			"order": "embMdXyCQZinGxkk2v85GA",                           // internal ID of the original order
			"reference": "SUD160811-1752-43151",                         // customer-facing reference for the original order
			"account": "_sOMzG2pSIyAeWXkcoNgUA",                         // FastSpring-generated customer account ID of the original order
			"currency": "USD",
			"payoutCurrency": "USD",
			"total": 10.0,
			"totalDisplay": "$10.00",
			"totalInPayoutCurrency": 10.0,
			"totalInPayoutCurrencyDisplay": "$10.00",
			"tax": 0.0,
			"taxDisplay": "$0.00",
			"taxInPayoutCurrency": 0.0,
			"taxInPayoutCurrencyDisplay": "$0.00",
			"subtotal": 10.0,
			"subtotalDisplay": "$10.00",
			"subtotalInPayoutCurrency": 10.0,
			"subtotalInPayoutCurrencyDisplay": "$10.00",
			"notes": [
			    {
				"note": "Before canceling the subscription",             // example note entered by the publisher / seller on the original order record (not the refund)
				"creator": "admin@furiousfalcon.com"                     // user ID of the seller's agent who entered the note
			    }
			],
			"subscriptions": 
			[
			"RPN1Bp62Q3mEXloZvxUxmg"                                     // ID of the subscription associated with the returned order (if any)
			]
		},
		"customer": {
			"first": "Test",
			"last": "Order",
			"email": "test@tes.com",
			"company": "Test",
			"phone": "1234567890"
		},
		"items": [
		    {
			"product": "newtestsuborder",
			"quantity": 1,
			"display": "newtestsuborder",
			"sku": null,
			"subtotal": 10.0,
			"subtotalDisplay": "$10.00",
			"subtotalInPayoutCurrency": 10.0,
			"subtotalInPayoutCurrencyDisplay": "$10.00",
			"subscription": "RPN1Bp62Q3mEXloZvxUxmg"                     // ID of the subscription associated with the returned order (if any)
		     }
		],
		"action": "return.get",
		"result": "success"
	}
  ]
}