Account and profile

Retrieving a customer's profile

get

Retrieves a customer's profile.

Note: The request needs to be authorized with a customer's access token or an anonymous access token.


Required scopes

No specific scopes are required.

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Query parameters
expandstringOptional

List of additional attributes to be retrieved, separated by commas. Possible value to be passed in this parameter is addresses.

Example: addresses
Responses
200
OK
application/json
get
GET /customer/{tenant}/me HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "title": "MR",
  "firstName": "John",
  "lastName": "Doe",
  "contactPhone": "123456789",
  "company": "Emporix",
  "preferredLanguage": "en_US",
  "preferredCurrency": "USD",
  "preferredSite": "default",
  "metadata": {
    "mixins": {},
    "version": 2
  },
  "mixins": {},
  "customerNumber": "13869000",
  "id": "13869000",
  "accounts": [
    {
      "id": "[email protected]"
    }
  ],
  "contactEmail": "[email protected]",
  "businessModel": "B2B",
  "b2b": {
    "companyRegistrationId": "123-456-789",
    "legalEntities": [
      {
        "id": "D165356",
        "name": "BMW",
        "contactAssignmentId": "D436432"
      }
    ]
  }
}

Deleting a customer's profile

delete

Deletes a customer's profile and the account associated with it.

Note: The request needs to be authorized with a customer's access token.


Required scopes

No specific scopes are required.

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Query parameters
tokenstringOptional

Token received by the customer through email.

Responses
202
Customer profile deletion confirmation was successfully accepted
delete
DELETE /customer/{tenant}/me HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Updating a customer's profile

patch

Updates a customer's profile.

Note: The request needs to be authorized with a customer's access token.


Required scopes

No specific scopes are required.

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Body
all ofOptional
Responses
200
OK
patch
PATCH /customer/{tenant}/me HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 283

{
  "title": "MR",
  "firstName": "John",
  "lastName": "Doe",
  "contactEmail": "[email protected]",
  "contactPhone": "123456789",
  "company": "Emporix",
  "preferredLanguage": "en_US",
  "preferredCurrency": "EUR",
  "preferredSite": "main",
  "b2b": {
    "companyRegistrationId": "123-456-789"
  },
  "metadata": {
    "version": 1
  }
}

No content

Assigning an account to a customer's profile

post

Assigns a customer account to the customer's profile.


Required scopes

  • customer.customer_update or customer.customer_manage

Authorizations
Path parameters
tenantstringRequired
Body
emailstringRequired

Customer's email address.

passwordstringRequired

Customer's account password.

Responses
201
Created
application/json
post
POST /customer/{tenant}/me/accounts/internal HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 57

{
  "email": "[email protected]",
  "password": "password123"
}
{
  "id": "13869000"
}

Was this helpful?