# Disapprove returned item

When a buyer rejects a delivery and it's returned, seller will be expected to either approve or reject such delivered item.&#x20;

Upon the seller's rejection of a return, the seller will opt for a dispute.&#x20;

{% hint style="info" %}
When the buyer rejects a delivery, the response parameters;

* "is\_return\_rejected" is set to true
*   "status" shows&#x20;

    ```
    DELIVERY_RETURN_REJECTED
    ```
{% endhint %}

## To reject a return

<mark style="color:purple;">`PATCH`</mark> `{{api_url}}/v1/milestones/{milestone_id}/reject/approve`

#### Query Parameters

| Name                                            | Type   | Description              |
| ----------------------------------------------- | ------ | ------------------------ |
| milestone\_id<mark style="color:red;">\*</mark> | string | specify the milestone id |

#### Headers

| Name                                            | Type   | Description                                    |
| ----------------------------------------------- | ------ | ---------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | your Trustcrow API keys to authorize customers |

#### Request Body

| Name                                         | Type   | Description           |
| -------------------------------------------- | ------ | --------------------- |
| seller\_id<mark style="color:red;">\*</mark> | string | input the seller's ID |

{% tabs %}
{% tab title="200 Milestone return rejected successfully" %}
```javascript
{
    "status": true,
    "message": "Milestone return rejected successfully",
    "data": {
        "id": "b3c1349e-04cd-4554-b73e-a224e5f702d7",
        "title": "testing milestone title",
        "description": "testing milestone description",
        "amount": 500,
        "is_milestone_funded": true,
        "position_in_transaction": 1,
        "is_delivered": true,
        "is_completed": false,
        "delivery_rejection_reason": "I do whatever I like",
        "is_delivery_rejected": false,
        "is_return_proof_sent": false,
        "is_return_approved": false,
        "is_return_rejected": true,
        "due_date_type": "DEADLINE_DATE",
        "due_date": "2023-12-31T00:00:00.000Z",
        "execution_timeline": null,
        "status": "DELIVERY_RETURN_REJECTED",
        "commission_payer": "SELLER_100",
        "discount_code": null,
        "milestone_fee": 16.25,
        "transaction_id": "d209c389-45c6-4f78-92c2-26f23db95d96",
        "inspection_duration": 2,
        "inspection_end_date": "2023-12-29T19:14:07.613Z",
        "return_deadline_date": "2023-12-30T19:14:18.760Z",
        "current_extension_index": null,
        "milestone_escrow_id": "d73605dc-467f-46ed-bbd1-9e63154c7ba2",
        "rate_used": 1,
        "created_at": "2023-12-27T14:48:32.423Z",
        "updated_at": "2023-12-27T19:59:37.752Z",
        "transaction": {
            "id": "d209c389-45c6-4f78-92c2-26f23db95d96",
            "title": "sales of team",
            "description": "Sales of heavy agricultural produce",
            "currency": "NGN",
            "location_type": "LOCAL",
            "category": "GOODS",
            "sub_category": "Food/beverage/agriculture",
            "transaction_contract_url": "https://trustcrow-dev-docs.s3.amazonaws.com/",
            "status": "MILESTONE_RETURN_AWAITING_APPROVAL",
            "transaction_originator": "BUYER",
            "buyer_id": "954c223a-11ea-4720-9538-157cc6f9d95e",
            "seller_id": "51a5acae-d2d9-410d-b7fa-d5db7ee86e01",
            "source": "api",
            "clientId": "ec5fe1cf-dcf3-48b9-b003-7417fea0c0f1",
            "transaction_amount": 500,
            "total_amount_funded": 500,
            "total_amount_refunded": 0,
            "total_amount_disbursed": 0,
            "current_milestone_id": "b3c1349e-04cd-4554-b73e-a224e5f702d7",
            "job_id": null,
            "decline_reason": null,
            "is_completed": false,
            "has_buyer_rated": false,
            "on_last_milestone": true,
            "has_seller_rated": false,
            "discount_code": null,
            "declined_at": null,
            "approved_at": null,
            "created_by": "ec5fe1cf-dcf3-48b9-b003-7417fea0c0f1",
            "updated_by": null,
            "date_canceled": null,
            "created_at": "2023-12-27T14:48:32.423Z",
            "updated_at": "2023-12-27T19:14:18.806Z",
            "buyer": {
                "id": "954c223a-11ea-4720-9538-157cc6f9d95e",
                "user_id": "369ea20c-212b-4b2a-9f87-31c7b11dec58",
                "organisation_id": "7019af1c-5762-443a-880f-6d950f31ce9f",
                "role": "SUPER ADMIN",
                "created_at": "2023-12-26T09:03:18.782Z",
                "updated_at": "2023-12-26T09:03:18.782Z",
                "organisation": {
                    "id": "7019af1c-5762-443a-880f-6d950f31ce9f",
                    "name": "Haleemah Opeyemi's Organisation",
                    "wallet_id": "b78ec8db-4bab-43c3-84a1-a9d55d036d54",
                    "paystack_customer_code": null,
                    "account_kyc_type": "INDIVIDUAL",
                    "is_kyc_completed": true,
                    "is_kyc_submitted": true,
                    "is_kyc_approved": true,
                    "is_kyc_declined": false,
                    "kyc_decline_reason": null,
                    "kyc_completed_at": "2023-12-27T18:56:53.228Z",
                    "created_by": "369ea20c-212b-4b2a-9f87-31c7b11dec58",
                    "kyc_approved_by": "796171ea-00fe-4894-9626-3245c5581643",
                    "kyc_declined_by": null,
                    "location_type": "LOCAL",
                    "updated_by": null,
                    "created_at": "2023-12-26T09:03:18.775Z",
                    "updated_at": "2023-12-27T18:57:16.394Z"
                },
                "user": {
                    "id": "369ea20c-212b-4b2a-9f87-31c7b11dec58",
                    "first_name": "Haleemah",
                    "last_name": "Opeyemi",
                    "user_name": "haopho31079",
                    "email": "haleemahfolag@yopmail.com",
                    "default_email": "ec5fe1cf-dcf3-48b9-b003-7417fea0c0f1_haleemahfolag@yopmail.com",
                    "phone": null,
                    "password": "$2b$10$H0xNaaLKERiHLvWsLQQLXegJtcBZvq64wAgfB5Yo53OzAsa8COM0C",
                    "is_account_verified": true,
                    "password_reset": false,
                    "role": "USER",
                    "referredById": null,
                    "referral_code": null,
                    "clientId": "ec5fe1cf-dcf3-48b9-b003-7417fea0c0f1",
                    "source": "THIRD_PARTY",
                    "public_key": null,
                    "secret_key": null,
                    "api_enabled": false,
                    "password_created": false,
                    "last_logged_in_at": "2023-12-27T18:55:47.527Z",
                    "created_at": "2023-12-26T09:03:18.766Z",
                    "updated_at": "2023-12-27T18:55:47.532Z"
                }
            },
            "seller": {
                "id": "eeae27bc-3e12-47f4-a6cb-fceaa3013629",
                "user_id": "7c4e5b33-eb74-41fd-8f07-230cfaeb2439",
                "organisation_id": "9876d61f-ad34-4d5a-be9d-46bee63c8c4a",
                "role": "SUPER ADMIN",
                "created_at": "2023-12-26T09:56:54.276Z",
                "updated_at": "2023-12-26T09:56:54.276Z",
                "organisation": {
                    "id": "9876d61f-ad34-4d5a-be9d-46bee63c8c4a",
                    "name": "John Doe's Organisation",
                    "wallet_id": "6ba37133-a54b-42d2-af1d-d20e1ed7a13a",
                    "paystack_customer_code": null,
                    "account_kyc_type": "INDIVIDUAL",
                    "is_kyc_completed": true,
                    "is_kyc_submitted": true,
                    "is_kyc_approved": true,
                    "is_kyc_declined": false,
                    "kyc_decline_reason": null,
                    "kyc_completed_at": "2023-12-27T17:54:04.786Z",
                    "created_by": "7c4e5b33-eb74-41fd-8f07-230cfaeb2439",
                    "kyc_approved_by": "796171ea-00fe-4894-9626-3245c5581643",
                    "kyc_declined_by": null,
                    "location_type": "LOCAL",
                    "updated_by": null,
                    "created_at": "2023-12-26T09:56:54.268Z",
                    "updated_at": "2023-12-27T17:54:35.700Z"
                },
                "user": {
                    "id": "7c4e5b33-eb74-41fd-8f07-230cfaeb2439",
                    "first_name": "John",
                    "last_name": "Doe",
                    "user_name": "jodojd30278",
                    "email": "joe@yopmail.com",
                    "default_email": "ec5fe1cf-dcf3-48b9-b003-7417fea0c0f1_joe@yopmail.com",
                    "phone": null,
                    "password": "$2b$10$.z0AxFZGE5rNdmxW0IJ3Zuu6TszOe.1Azqyx0RC71uQ20QvX6TTGO",
                    "is_account_verified": true,
                    "password_reset": false,
                    "role": "USER",
                    "referredById": null,
                    "referral_code": null,
                    "clientId": "ec5fe1cf-dcf3-48b9-b003-7417fea0c0f1",
                    "source": "THIRD_PARTY",
                    "public_key": null,
                    "secret_key": null,
                    "api_enabled": false,
                    "password_created": false,
                    "last_logged_in_at": "2023-12-27T17:52:27.017Z",
                    "created_at": "2023-12-26T09:56:54.249Z",
                    "updated_at": "2023-12-27T17:52:27.030Z"
                }
            }
        },
        "milestone_escrow": {
            "id": "d73605dc-467f-46ed-bbd1-9e63154c7ba2",
            "balance": 500,
            "created_at": "2023-12-27T14:48:32.423Z",
            "updated_at": "2023-12-27T19:13:26.454Z"
        }
    }
}
```
{% endtab %}
{% endtabs %}

## cURL Request&#x20;

```javascript
curl --location --request PATCH 'http://trustcrow-api-sandbox.us-east-1.elasticbeanstalk.com/v1/milestones/b3c1349e-04cd-4554-b73e-a224e5f702d7/reject/disapprove' \
--header 'Content-Type: application/json' \
--header 'Authorization: SECRET_KEY' \
--data '{
    "seller_id": "51a5acae-d2d9-410d-b7fa-d5db7ee86e01"
}'
```

