Rest API: unable to send account invite while I create a customer

Solved

Rest API: unable to send account invite while I create a customer

egiuliani
Shopify Partner
7 0 4

Hi,

I need to create customers via API and automatically send the activation account email.

I do a POST call to  /admin/api/2021-07/customers.json with the following data:

 

 

{
  "customer": {
    "first_name": "Steve",
    "last_name": "Lastnameson",
    "email": "egiuliani@endurance.it",
    "phone": "+15142546011",
    "verified_email": true,
    "addresses": [
      {
        "address1": "123 Oak St",
        "city": "Ottawa",
        "province": "ON",
        "phone": "555-1212",
        "zip": "123 ABC",
        "last_name": "Lastnameson",
        "first_name": "Mother",
        "country": "CA"
      }
    ],
    "send_email_invite": true
  }
}​

 

Customer is properly created but none invite is send. 

egiuliani_0-1631281691437.png

Did I misunderstand the function of this field?

Thanks!

Accepted Solution (1)

Luke_K
Shopify Staff
402 66 102

This is an accepted solution.

Hey @egiuliani 

That's strange - I do exactly the same via the POST to customers.json and the Account email Invite is sent fine as we expect, and it's received ok at my test email.

Would you like to send me the x-request_id for one of these requests? I can then check out the logs. Thanks!

 

 

 

| Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!

View solution in original post

Reply 1 (1)

Luke_K
Shopify Staff
402 66 102

This is an accepted solution.

Hey @egiuliani 

That's strange - I do exactly the same via the POST to customers.json and the Account email Invite is sent fine as we expect, and it's received ok at my test email.

Would you like to send me the x-request_id for one of these requests? I can then check out the logs. Thanks!

 

 

 

| Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!