POST
/
consumers
curl --request POST \
  --url https://api.sulu.sh/v0/consumers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "email": "jsmith@example.com",
  "metadata": {},
  "phone": "<string>",
  "address": {
    "line1": "<string>",
    "line2": "<string>",
    "city": "<string>",
    "state": "<string>",
    "country": "<string>",
    "zipCode": "<string>"
  },
  "organizationId": "<string>"
}'
{
  "id": "<string>",
  "object": "consumer",
  "name": "<string>",
  "email": "jsmith@example.com",
  "metadata": {},
  "phone": "<string>",
  "address": {
    "line1": "<string>",
    "line2": "<string>",
    "city": "<string>",
    "state": "<string>",
    "country": "<string>",
    "zipCode": "<string>"
  },
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

The name of the consumer.

email
string
required

The email address of the consumer, used for communication and account verification.

metadata
object

Additional metadata associated with the consumer, represented as key-value pairs.

phone
string

The phone number of the consumer for contact purposes.

address
object

The address of the consumer, including details such as street, city, state, and postal code.

organizationId
string

Provide an organization ID if you wish to associate this consumer with an existing merchant organization.

Response

201
application/json
Consumer created successfully
id
string

Unique identifier for the consumer organization.

object
enum<string>
default:consumer

String representing the object's type.

Available options:
consumer
name
string

The name of the consumer.

email
string

The email address of the consumer.

metadata
object

Additional metadata associated with the consumer.

phone
string

The phone number of the consumer.

address
object

The address of the consumer.

createdAt
string

Timestamp when the consumer was created.

updatedAt
string

Timestamp when the consumer was last updated.