cancel
Showing results for 
Search instead for 
Did you mean: 

API for registration additional fields

API for registration additional fields

Hi team, 

Have created additional fields for registration form. I need to register via api along with additional fields. 

Could you please help me on this ?  

7 REPLIES 7

Re: API for registration additional fields

Hello @sankar_g 

 

Follow this method by passing the additional field in attribute_code :

{
  "customer": {
    "email": "test@gmail.com",
    "firstname": "First",
    "lastname": "Last",
    "storeId": 1,
    "websiteId": 1,
    "custom_attributes": [
     {
       "attribute_code": "mobile_number",
       "value": "9876543210"
     }
    ]
  },
  "password": "1596@test"
}

Hope it helps.

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution"

Re: API for registration additional fields

@sankar_g you can call the api as suggested by @Meetanshi.

 

Just replace the  mobile_number with your custom attribute code and use the below url.

 

Url : http://www.xxxxxxxx.com/rest/V1/customers

 

Thanks

Re: API for registration additional fields

@Rahul Gupta @Meetanshi  

How can i get customer customer attributes via API ?

Re: API for registration additional fields

Re: API for registration additional fields

Thanks @rahul Gupta 

We need to upload file when registration. Could you please help on that too 
How we pass the media/file via API 

 

How to trigger email notification if we create customer via rest api 

Re: API for registration additional fields

@sankar_g you have to create a new attribute with its type as file and then you will repeat the same procedure.

 

Hope it helps.

 

Thanks

Re: API for registration additional fields

@rahulGupta 

Really appreciate your help

I created customer attributes successfully.  I need to validate the customer attributes in rest api 
could you please help me on that too 

Have customer data in csv file 
how can i import customer data with customer attributes