Attributes

Get a customers attributes

Requires admin privileges

GET/api/customers/{customer_id}/attributes
Path parameters
customer_id*integer (int64)
Query parameters
Response

OK

Body
namenullable string
valuesnullable array of string
Request
const response = await fetch('/api/customers/{customer_id}/attributes', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "name": "text",
    "values": [
      "text"
    ]
  }
]

Add a customer attribute

Requires admin privileges

POST/api/customers/{customer_id}/attributes
Path parameters
customer_id*integer (int64)
Body
namenullable string
valuesnullable array of string
Response

OK

Body
namenullable string
valuesnullable array of string
Request
const response = await fetch('/api/customers/{customer_id}/attributes', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "name": "text",
  "values": [
    "text"
  ]
}

Update a customer attribute

Requires admin privileges

PUT/api/customers/{customer_id}/attributes
Path parameters
customer_id*integer (int64)
Body
namenullable string
valuesnullable array of string
Response

OK

Body
namenullable string
valuesnullable array of string
Request
const response = await fetch('/api/customers/{customer_id}/attributes', {
    method: 'PUT',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "name": "text",
  "values": [
    "text"
  ]
}