Graph API Version

Commerce Merchant Settings Returns

Reading

All Returns on all channels for a particular Merchant

Example

Graph API Explorer
GET /v7.0/{commerce-merchant-settings-id}/returns HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '/{commerce-merchant-settings-id}/returns',
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "/{commerce-merchant-settings-id}/returns",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{commerce-merchant-settings-id}/returns",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{commerce-merchant-settings-id}/returns"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

ParameterDescription
end_time_created
datetime/timestamp
Default value: 1593945927

Limit to returns created before a certain time

merchant_return_id
string

Filter to find returns with matching merchant_return_id, which was provided when approving/disapproving a return.

start_time_created
datetime/timestamp
Default value: 0

Limit to returns created after a certain time

statuses
array<enum {APPROVED, DISAPPROVED, MERCHANT_MARKED_COMPLETED, REQUESTED, REFUNDED}>
Default value: []

Filter by return status

Fields

Reading from this edge will return a JSON formatted result:

{ "data": [], "paging": {} }

data

A list of CommerceReturn nodes.

paging

For more details about pagination, see the Graph API guide.

Validation Rules

ErrorDescription
200Permissions error

Creating

You can't perform this operation on this endpoint.

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.