# How to push/ delete address id in the customer object?

**URL:** https://community.rapyd.net/t/how-to-push-delete-address-id-in-the-customer-object/1785
**Category:** 🙋🏽‍♀️🙋🏽‍♂️ Ask Questions
**Tags:** open-discussion
**Created:** [May 20, 2022, 4:14pm UTC](https://community.rapyd.net/t/how-to-push-delete-address-id-in-the-customer-object/1785 "2022-05-20T16:14:00Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Vikash\_Kumar](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/vikash_kumar/32/1827_2.png) [@Vikash\_Kumar](https://community.rapyd.net/u/Vikash_Kumar)
#### Post date: [May 20, 2022, 4:14pm UTC](https://community.rapyd.net/t/how-to-push-delete-address-id-in-the-customer-object/1785/1 "2022-05-20T16:14:00Z")

</div>

I want to update customer object with new address id. How can anyone push address id in the array of addresses object of the customer?

---

<div class="post-metadata">

### Author: ![Community\_Team](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@Community\_Team](https://community.rapyd.net/u/Community_Team)
#### Post date: [May 20, 2022, 10:05pm UTC](https://community.rapyd.net/t/how-to-push-delete-address-id-in-the-customer-object/1785/2 "2022-05-20T22:05:28Z")

</div>

Thanks @Vikash_Kumar,

The address can be updated through the [Address Object](https://docs.rapyd.net/build-with-rapyd/reference/address-object) and [Update Address](https://docs.rapyd.net/build-with-rapyd/reference/address-object#update-address).

The address should have an address ID in this case `"id": "address_c67d5ef3aa054cc8a8ffc16944d33ccc",`

## [Retrieve Customer](https://docs.rapyd.net/build-with-rapyd/reference/customer-object#retrieve-customer)

Use the ID `cus_e351b78941cc294ff44b4e4182969470` to retrieve the customer object.

**Response**

```auto
{
    "status": {
        "error_code": "",
        "status": "SUCCESS",
        "message": "",
        "response_code": "",
        "operation_id": "e6f1f4ab-2a7f-4453-a734-08ed625505ac"
    },
    "data": {
        "id": "cus_e351b78941cc294ff44b4e4182969470",
        "delinquent": false,
        "discount": null,
        "name": "Singapore Customer",
        "default_payment_method": "card_8f93670eb8ec447721d90ca403d63d9a",
        "description": "",
        "email": "test@gmail.com",
        "phone_number": "+655555555555",
        "invoice_prefix": "",
        "addresses": [
            {
                "id": "address_c67d5ef3aa054cc8a8ffc16944d33ccc",
                "name": "Singapore Customer",
                "line_1": "123 Main St",
                "line_2": "",
                "line_3": "",
                "city": "Singapore",
                "state": "01",
                "country": "SG",
                "zip": "4444",
                "phone_number": "",
                "metadata": {},
                "canton": "",
                "district": "",
                "created_at": 1638568973
            }
        ],
        "payment_methods": {
            "data": [
                {
                    "id": "card_8f93670eb8ec447721d90ca403d63d9a",
                    "type": "sg_credit_cup_card",
                    "category": "card",
                    "metadata": {},
                    "image": "https://iconslib.rapyd.net/checkout/sg_credit_cup_card.png",
                    "webhook_url": "",
                    "supporting_documentation": "",
                    "next_action": "not_applicable",
                    "name": "Singapore Customer",
                    "last4": "1111",
                    "acs_check": "unchecked",
                    "cvv_check": "unchecked",
                    "bin_details": {
                        "type": null,
                        "brand": null,
                        "country": null,
                        "bin_number": "411111"
                    },
                    "expiration_year": "28",
                    "expiration_month": "12",
                    "fingerprint_token": "ocfp_2a694038316f52122bbbb3ae926cfda9"
                }
            ],
            "has_more": false,
            "total_count": 1,
            "url": "/v1/customers/cus_e351b78941cc294ff44b4e4182969470/payment_methods"
        },
        "subscriptions": null,
        "created_at": 1638568973,
        "metadata": {},
        "business_vat_id": "",
        "ewallet": ""
    }
}

```

## [Update Address](https://docs.rapyd.net/build-with-rapyd/reference/address-object#update-address)

Use ID `address_c67d5ef3aa054cc8a8ffc16944d33ccc` to update the address.

**Request**

```auto
{
    "metadata": {
        "merchant_defined": "updated"
    },
       "line_1": "21 Jalan Melati",
        "city": "Singapore",
        "zip": "368907"
}

```

**Response**

```auto
{
    "status": {
        "error_code": "",
        "status": "SUCCESS",
        "message": "",
        "response_code": "",
        "operation_id": "8a97cdbe-2c5e-408f-a5ae-6d778814491d"
    },
    "data": {
        "id": "address_c67d5ef3aa054cc8a8ffc16944d33ccc",
        "name": "Singapore Customer",
        "line_1": "21 Jalan Melati",
        "line_2": "",
        "line_3": "",
        "city": "Singapore",
        "state": "01",
        "country": "SG",
        "zip": "368907",
        "phone_number": "",
        "metadata": {
            "merchant_defined": "updated"
        },
        "canton": "",
        "district": "",
        "created_at": 1638568973
    }
}

```

## [Retrieve Customer](https://docs.rapyd.net/build-with-rapyd/reference/customer-object#retrieve-customer)

**Response**

```auto
{
    "status": {
        "error_code": "",
        "status": "SUCCESS",
        "message": "",
        "response_code": "",
        "operation_id": "82ac0da0-2e0b-4c7f-84f2-c8ebadff5794"
    },
    "data": {
        "id": "cus_e351b78941cc294ff44b4e4182969470",
        "delinquent": false,
        "discount": null,
        "name": "Singapore Customer",
        "default_payment_method": "card_8f93670eb8ec447721d90ca403d63d9a",
        "description": "",
        "email": "test@gmail.com",
        "phone_number": "+655555555555",
        "invoice_prefix": "",
        "addresses": [
            {
                "id": "address_c67d5ef3aa054cc8a8ffc16944d33ccc",
                "name": "Singapore Customer",
                "line_1": "21 Jalan Melati",
                "line_2": "",
                "line_3": "",
                "city": "Singapore",
                "state": "01",
                "country": "SG",
                "zip": "368907",
                "phone_number": "",
                "metadata": {
                    "merchant_defined": "updated"
                },
                "canton": "",
                "district": "",
                "created_at": 1638568973
            }
        ],
        "payment_methods": {
            "data": [
                {
                    "id": "card_8f93670eb8ec447721d90ca403d63d9a",
                    "type": "sg_credit_cup_card",
                    "category": "card",
                    "metadata": {},
                    "image": "https://iconslib.rapyd.net/checkout/sg_credit_cup_card.png",
                    "webhook_url": "",
                    "supporting_documentation": "",
                    "next_action": "not_applicable",
                    "name": "Singapore Customer",
                    "last4": "1111",
                    "acs_check": "unchecked",
                    "cvv_check": "unchecked",
                    "bin_details": {
                        "type": null,
                        "brand": null,
                        "country": null,
                        "bin_number": "411111"
                    },
                    "expiration_year": "28",
                    "expiration_month": "12",
                    "fingerprint_token": "ocfp_2a694038316f52122bbbb3ae926cfda9"
                }
            ],
            "has_more": false,
            "total_count": 1,
            "url": "/v1/customers/cus_e351b78941cc294ff44b4e4182969470/payment_methods"
        },
        "subscriptions": null,
        "created_at": 1638568973,
        "metadata": {},
        "business_vat_id": "",
        "ewallet": ""
    }
}

```
