Create an Instacart user
POST /v2/fulfillment_sandbox/instacart_users
Creates an Instacart user.
Security
Name | In | Description |
---|---|---|
Authorization | header | The Authorization header with the bearer token acquired during authentication. |
Parameters
None.Request
Field | Type | Required | Description |
---|---|---|---|
email | string | The email of the Instacart User. | |
phone | string | The phone number of the Instacart User. | |
password | string | The password of the Instacart User. | |
express_member | boolean | Deprecated. Use 'instacartplus_member' instead. Defaults to false. | |
instacartplus_member | boolean | Indicates whether the Instacart User is an Instacart+ member. Defaults to false. |
Request examples
- cURL
- Java
- Python
- Go
curl --request POST \
--url https://connect.instacart.com/v2/fulfillment_sandbox/instacart_users \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"email": "string",
"phone": "string",
"password": "string",
"express_member": true,
"instacartplus_member": true
}'
HttpResponse<String> response = Unirest.post("https://connect.instacart.com/v2/fulfillment_sandbox/instacart_users")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.header("Authorization", "Bearer <token>")
.body("{\n \"email\": \"string\",\n \"phone\": \"string\",\n \"password\": \"string\",\n \"express_member\": true,\n \"instacartplus_member\": true\n}")
.asString();
import http.client
conn = http.client.HTTPSConnection("connect.instacart.com")
payload = "{\n \"email\": \"string\",\n \"phone\": \"string\",\n \"password\": \"string\",\n \"express_member\": true,\n \"instacartplus_member\": true\n}"
headers = {
'Accept': "application/json",
'Content-Type': "application/json",
'Authorization': "Bearer <token>"
}
conn.request("POST", "/v2/fulfillment_sandbox/instacart_users", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://connect.instacart.com/v2/fulfillment_sandbox/instacart_users"
payload := strings.NewReader("{\n \"email\": \"string\",\n \"phone\": \"string\",\n \"password\": \"string\",\n \"express_member\": true,\n \"instacartplus_member\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
Response
Field | Type | Required | Description |
---|---|---|---|
id | integer | The ID of the Instacart user. |
Response examples
200 Success
200
Instacart User created
{
"id": 1
}
4XX Errors
Error responses return either a single error or multiple errors.
HTTP Code | Cause | Error Message | Error Code | Error Meta |
---|---|---|---|---|
400 | Account already exists | "An account already exists with this email" | 1001 | {"key":"email"} |