SalesChannelCustomers

Retrieve Sales Channel Customer

get

Retrieve a specific Sales Channel Customer instance by ID

Authorizations
Path parameters
channel_idintegerRequired

The channel ID of the resource.

Example: 5
idintegerRequired

Unique identifier of the resource

Example: 1
Responses
200
Sales Channel Customer retrieved successfully
application/json
get
GET /api/v1/channel/{channel_id}/customers/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "pk": 123,
  "email": "[email protected]",
  "first_name": "John",
  "last_name": "Doe",
  "phone_number": "+123456789",
  "is_active": true,
  "channel_code": "CH123",
  "erp_code": "ERP456",
  "attributes": {
    "logged_ip": "127.0.0.1",
    "register_client_type": "default"
  },
  "attribute_kwargs": {},
  "localized_attributes": {},
  "localized_attribute_kwargs": {},
  "extra_field": {
    "key1": "value1",
    "key2": 100
  },
  "email_allowed": true,
  "sms_allowed": false,
  "call_allowed": true,
  "date_joined": "2023-01-15T10:30:00Z",
  "gender": "female",
  "user_type": "guest",
  "date_of_birth": "1985-08-25",
  "channel": 5
}

Update Sales Channel Customer

put

Update an existing Sales Channel Customer instance by ID

Authorizations
Path parameters
channel_idintegerRequired

The channel ID of the resource.

Example: 5
idintegerRequired

Unique identifier of the resource

Example: 1
Body
pkanyRead-onlyOptional

Customer ID

Example: 123
emailstring · emailRequired

Email address of the customer

Example: [email protected]
first_namestring · max: 255Optional

First name of the customer

Example: John
last_namestring · max: 255Optional

Last name of the customer

Example: Doe
phone_numberstring | nullableOptional

Phone number of the customer

Example: +123456789
is_activebooleanRequired

Indicates if the customer is active

Default: falseExample: true
channel_codestring · max: 64Required

Code representing the channel the customer belongs to

Example: CH123
erp_codestring | nullableOptional

Partner customer code (ERP code)

Example: ERP456
attributesobjectOptional

Attributes as a JSON object

Example: {"logged_ip":"127.0.0.1","register_client_type":"default"}
attribute_kwargsobjectOptional

Attribute kwargs as a JSON object

localized_attributesobjectOptional

Localized attributes as a JSON object

localized_attribute_kwargsobjectOptional

Localized attribute kwargs as a JSON object

extra_fieldobjectOptional

Additional fields as a JSON object

Example: {"key1":"value1","key2":100}
email_allowedbooleanRequired

Indicates if the customer allows receiving emails

Example: true
sms_allowedbooleanRequired

Indicates if the customer allows receiving SMS

Example: false
call_allowedbooleanRequired

Indicates if the customer allows receiving calls

Example: true
date_joinedstring · date-time | nullableOptional

The date when the customer joined

Example: 2023-01-15T10:30:00Z
genderstring · enum | nullableOptional

Gender of the customer

Example: femalePossible values:
user_typestring · enum | nullableOptional

Type of user

Example: guestPossible values:
date_of_birthstring · date | nullableOptional

Date of birth of the customer

Example: 1985-08-25
channelinteger | nullableOptional

ID of the channel the customer belongs to

Example: 5
Responses
200
Sales Channel Customer updated successfully
application/json
put
PUT /api/v1/channel/{channel_id}/customers/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 528

{
  "email": "[email protected]",
  "first_name": "John",
  "last_name": "Doe",
  "phone_number": "+123456789",
  "is_active": true,
  "channel_code": "CH123",
  "erp_code": "ERP456",
  "attributes": {
    "logged_ip": "127.0.0.1",
    "register_client_type": "default"
  },
  "attribute_kwargs": {},
  "localized_attributes": {},
  "localized_attribute_kwargs": {},
  "extra_field": {
    "key1": "value1",
    "key2": 100
  },
  "email_allowed": true,
  "sms_allowed": false,
  "call_allowed": true,
  "date_joined": "2023-01-15T10:30:00Z",
  "gender": "female",
  "user_type": "guest",
  "date_of_birth": "1985-08-25",
  "channel": 5
}
{
  "pk": 123,
  "email": "[email protected]",
  "first_name": "John",
  "last_name": "Doe",
  "phone_number": "+123456789",
  "is_active": true,
  "channel_code": "CH123",
  "erp_code": "ERP456",
  "attributes": {
    "logged_ip": "127.0.0.1",
    "register_client_type": "default"
  },
  "attribute_kwargs": {},
  "localized_attributes": {},
  "localized_attribute_kwargs": {},
  "extra_field": {
    "key1": "value1",
    "key2": 100
  },
  "email_allowed": true,
  "sms_allowed": false,
  "call_allowed": true,
  "date_joined": "2023-01-15T10:30:00Z",
  "gender": "female",
  "user_type": "guest",
  "date_of_birth": "1985-08-25",
  "channel": 5
}

Delete Sales Channel Customer

delete

Delete a specific Sales Channel Customer instance by ID

Authorizations
Path parameters
channel_idintegerRequired

The channel ID of the resource.

Example: 5
idintegerRequired

Unique identifier of the resource

Example: 1
Responses
204
Sales Channel Customer deleted successfully
delete
DELETE /api/v1/channel/{channel_id}/customers/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*

No content

Partially Update Sales Channel Customer

patch

Partially update an existing Sales Channel Customer instance by ID

Authorizations
Path parameters
channel_idintegerRequired

The channel ID of the resource.

Example: 5
idintegerRequired

Unique identifier of the resource

Example: 1
Body
pkanyRead-onlyOptional

Customer ID

Example: 123
emailstring · emailRequired

Email address of the customer

Example: [email protected]
first_namestring · max: 255Optional

First name of the customer

Example: John
last_namestring · max: 255Optional

Last name of the customer

Example: Doe
phone_numberstring | nullableOptional

Phone number of the customer

Example: +123456789
is_activebooleanRequired

Indicates if the customer is active

Default: falseExample: true
channel_codestring · max: 64Required

Code representing the channel the customer belongs to

Example: CH123
erp_codestring | nullableOptional

Partner customer code (ERP code)

Example: ERP456
attributesobjectOptional

Attributes as a JSON object

Example: {"logged_ip":"127.0.0.1","register_client_type":"default"}
attribute_kwargsobjectOptional

Attribute kwargs as a JSON object

localized_attributesobjectOptional

Localized attributes as a JSON object

localized_attribute_kwargsobjectOptional

Localized attribute kwargs as a JSON object

extra_fieldobjectOptional

Additional fields as a JSON object

Example: {"key1":"value1","key2":100}
email_allowedbooleanRequired

Indicates if the customer allows receiving emails

Example: true
sms_allowedbooleanRequired

Indicates if the customer allows receiving SMS

Example: false
call_allowedbooleanRequired

Indicates if the customer allows receiving calls

Example: true
date_joinedstring · date-time | nullableOptional

The date when the customer joined

Example: 2023-01-15T10:30:00Z
genderstring · enum | nullableOptional

Gender of the customer

Example: femalePossible values:
user_typestring · enum | nullableOptional

Type of user

Example: guestPossible values:
date_of_birthstring · date | nullableOptional

Date of birth of the customer

Example: 1985-08-25
channelinteger | nullableOptional

ID of the channel the customer belongs to

Example: 5
Responses
200
Sales Channel Customer updated successfully
application/json
patch
PATCH /api/v1/channel/{channel_id}/customers/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 528

{
  "email": "[email protected]",
  "first_name": "John",
  "last_name": "Doe",
  "phone_number": "+123456789",
  "is_active": true,
  "channel_code": "CH123",
  "erp_code": "ERP456",
  "attributes": {
    "logged_ip": "127.0.0.1",
    "register_client_type": "default"
  },
  "attribute_kwargs": {},
  "localized_attributes": {},
  "localized_attribute_kwargs": {},
  "extra_field": {
    "key1": "value1",
    "key2": 100
  },
  "email_allowed": true,
  "sms_allowed": false,
  "call_allowed": true,
  "date_joined": "2023-01-15T10:30:00Z",
  "gender": "female",
  "user_type": "guest",
  "date_of_birth": "1985-08-25",
  "channel": 5
}
{
  "pk": 123,
  "email": "[email protected]",
  "first_name": "John",
  "last_name": "Doe",
  "phone_number": "+123456789",
  "is_active": true,
  "channel_code": "CH123",
  "erp_code": "ERP456",
  "attributes": {
    "logged_ip": "127.0.0.1",
    "register_client_type": "default"
  },
  "attribute_kwargs": {},
  "localized_attributes": {},
  "localized_attribute_kwargs": {},
  "extra_field": {
    "key1": "value1",
    "key2": 100
  },
  "email_allowed": true,
  "sms_allowed": false,
  "call_allowed": true,
  "date_joined": "2023-01-15T10:30:00Z",
  "gender": "female",
  "user_type": "guest",
  "date_of_birth": "1985-08-25",
  "channel": 5
}

Retrieve Sales Channel Customer with Details

get

Retrieve a specific Sales Channel Customer instance by ID with additional details

Authorizations
Path parameters
channel_idintegerRequired

The channel ID of the resource.

Example: 5
idintegerRequired

Unique identifier of the resource

Example: 1
Responses
200
Sales Channel Customer with details retrieved successfully
application/json
get
GET /api/v1/channel/{channel_id}/customers/{id}/detailed/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "channel": 5,
  "orders_info": {
    "total_order_amount": 1,
    "total_refund_amount": 1,
    "total_discount_amount": 1,
    "total_order_count": 1
  },
  "pk": 123,
  "email": "[email protected]",
  "first_name": "John",
  "last_name": "Doe",
  "phone_number": "+123456789",
  "is_active": true,
  "channel_code": "CH123",
  "erp_code": "ERP456",
  "attributes": {
    "logged_ip": "127.0.0.1",
    "register_client_type": "default"
  },
  "attribute_kwargs": {},
  "localized_attributes": {},
  "localized_attribute_kwargs": {},
  "extra_field": {
    "key1": "value1",
    "key2": 100
  },
  "email_allowed": true,
  "sms_allowed": false,
  "call_allowed": true,
  "date_joined": "2023-01-15T10:30:00Z",
  "gender": "female",
  "user_type": "guest",
  "date_of_birth": "1985-08-25"
}

List Sales Channel Customers

get

Retrieve a list of sales channel customers with optional filters

Authorizations
Path parameters
channel_idintegerRequired

The channel ID of the resource.

Example: 5
Query parameters
pageinteger · min: 1Optional

Specifies the page number of the current dataset

Default: 1
limitinteger · min: 1Optional

Indicates the number of rows on the current page.

Default: 10
emailstring · emailOptional

Email address of the customer

Example: [email protected]
email__startswithstringOptional

Email address of the customer starting with the specified value

Example: test
channelintegerOptional

ID of the channel the customer belongs to

Example: 5
channel_codestringOptional

Code representing the channel the customer belongs to

Example: CH123
phone_numberstringOptional

Phone number of the customer

Example: +123456789
created_datestring · date-timeOptional

Filter by creation date using supported lookup expressions (e.g., gt, gte, lt, lte, date__gt, etc.).

Example: created_date__gt=2024-01-01T00:00:00Z
pk__ininteger[]Optional

Filter by multiple primary key values (comma-separated list of integers)

extra_field__some_keystringOptional

Filter by a specific key in the 'extra_field' JSON object.

Example: extra_field__some_key=some_value
attributes__some_keystringOptional

Filter by a specific key in the 'attributes' JSON object.

Example: some_value
first_namestringOptional

First name of the customer

Example: John
last_namestringOptional

Last name of the customer

Example: Doe
erp_codestringOptional

Filter by ERP code (contains)

Example: ERPCODE123
email_allowedbooleanOptional

Indicates if the customer allows receiving emails

Example: true
sms_allowedbooleanOptional

Indicates if the customer allows receiving SMS

Example: false
call_allowedbooleanOptional

Indicates if the customer allows receiving calls

Example: true
date_joinedstring · date-timeOptional

The date when the customer joined

Example: 2018-08-16T11:20:14.736995Z
genderstring · enumOptional

Filter by gender

Example: malePossible values:
user_typestring · enumOptional

Filter by user type

Example: guestPossible values:
date_of_birthstring · dateOptional

Filter by date of birth

Example: 1985-08-25
Responses
200
List of Sales Channel Customers
application/json
get
GET /api/v1/channel/{channel_id}/customers/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
[
  {
    "pk": 123,
    "email": "[email protected]",
    "first_name": "John",
    "last_name": "Doe",
    "phone_number": "+123456789",
    "is_active": true,
    "channel_code": "CH123",
    "erp_code": "ERP456",
    "attributes": {
      "logged_ip": "127.0.0.1",
      "register_client_type": "default"
    },
    "attribute_kwargs": {},
    "localized_attributes": {},
    "localized_attribute_kwargs": {},
    "extra_field": {
      "key1": "value1",
      "key2": 100
    },
    "email_allowed": true,
    "sms_allowed": false,
    "call_allowed": true,
    "date_joined": "2023-01-15T10:30:00Z",
    "gender": "female",
    "user_type": "guest",
    "date_of_birth": "1985-08-25",
    "channel": 5
  }
]

Create a new Customer

post

Create a new Sales Channel Customer for a specific channel.

Authorizations
Path parameters
channel_idintegerRequired

The channel ID of the resource.

Example: 5
Body
pkanyRead-onlyOptional

Customer ID

Example: 123
emailstring · emailRequired

Email address of the customer

Example: [email protected]
first_namestring · max: 255Optional

First name of the customer

Example: John
last_namestring · max: 255Optional

Last name of the customer

Example: Doe
phone_numberstring | nullableOptional

Phone number of the customer

Example: +123456789
is_activebooleanRequired

Indicates if the customer is active

Default: falseExample: true
channel_codestring · max: 64Required

Code representing the channel the customer belongs to

Example: CH123
erp_codestring | nullableOptional

Partner customer code (ERP code)

Example: ERP456
attributesobjectOptional

Attributes as a JSON object

Example: {"logged_ip":"127.0.0.1","register_client_type":"default"}
attribute_kwargsobjectOptional

Attribute kwargs as a JSON object

localized_attributesobjectOptional

Localized attributes as a JSON object

localized_attribute_kwargsobjectOptional

Localized attribute kwargs as a JSON object

extra_fieldobjectOptional

Additional fields as a JSON object

Example: {"key1":"value1","key2":100}
email_allowedbooleanRequired

Indicates if the customer allows receiving emails

Example: true
sms_allowedbooleanRequired

Indicates if the customer allows receiving SMS

Example: false
call_allowedbooleanRequired

Indicates if the customer allows receiving calls

Example: true
date_joinedstring · date-time | nullableOptional

The date when the customer joined

Example: 2023-01-15T10:30:00Z
genderstring · enum | nullableOptional

Gender of the customer

Example: femalePossible values:
user_typestring · enum | nullableOptional

Type of user

Example: guestPossible values:
date_of_birthstring · date | nullableOptional

Date of birth of the customer

Example: 1985-08-25
channelinteger | nullableOptional

ID of the channel the customer belongs to

Example: 5
Responses
201
Sales Channel Customer created successfully
application/json
post
POST /api/v1/channel/{channel_id}/customers/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 528

{
  "email": "[email protected]",
  "first_name": "John",
  "last_name": "Doe",
  "phone_number": "+123456789",
  "is_active": true,
  "channel_code": "CH123",
  "erp_code": "ERP456",
  "attributes": {
    "logged_ip": "127.0.0.1",
    "register_client_type": "default"
  },
  "attribute_kwargs": {},
  "localized_attributes": {},
  "localized_attribute_kwargs": {},
  "extra_field": {
    "key1": "value1",
    "key2": 100
  },
  "email_allowed": true,
  "sms_allowed": false,
  "call_allowed": true,
  "date_joined": "2023-01-15T10:30:00Z",
  "gender": "female",
  "user_type": "guest",
  "date_of_birth": "1985-08-25",
  "channel": 5
}
{
  "pk": 123,
  "email": "[email protected]",
  "first_name": "John",
  "last_name": "Doe",
  "phone_number": "+123456789",
  "is_active": true,
  "channel_code": "CH123",
  "erp_code": "ERP456",
  "attributes": {
    "logged_ip": "127.0.0.1",
    "register_client_type": "default"
  },
  "attribute_kwargs": {},
  "localized_attributes": {},
  "localized_attribute_kwargs": {},
  "extra_field": {
    "key1": "value1",
    "key2": 100
  },
  "email_allowed": true,
  "sms_allowed": false,
  "call_allowed": true,
  "date_joined": "2023-01-15T10:30:00Z",
  "gender": "female",
  "user_type": "guest",
  "date_of_birth": "1985-08-25",
  "channel": 5
}

List Sales Channel Customers with Details

get

Retrieve a detailed list of sales channel customers with optional filters

Authorizations
Path parameters
channel_idintegerRequired

The channel ID of the resource.

Example: 5
Query parameters
pageinteger · min: 1Optional

Specifies the page number of the current dataset

Default: 1
limitinteger · min: 1Optional

Indicates the number of rows on the current page.

Default: 10
emailstring · emailOptional

Email address of the customer

Example: [email protected]
email__startswithstringOptional

Email address of the customer starting with the specified value

Example: test
channelintegerOptional

ID of the channel the customer belongs to

Example: 5
channel_codestringOptional

Code representing the channel the customer belongs to

Example: CH123
phone_numberstringOptional

Phone number of the customer

Example: +123456789
created_datestring · date-timeOptional

Filter by creation date using supported lookup expressions (e.g., gt, gte, lt, lte, date__gt, etc.).

Example: created_date__gt=2024-01-01T00:00:00Z
pk__ininteger[]Optional

Filter by multiple primary key values (comma-separated list of integers)

extra_field__some_keystringOptional

Filter by a specific key in the 'extra_field' JSON object.

Example: extra_field__some_key=some_value
attributes__some_keystringOptional

Filter by a specific key in the 'attributes' JSON object.

Example: some_value
first_namestringOptional

First name of the customer

Example: John
last_namestringOptional

Last name of the customer

Example: Doe
erp_codestringOptional

Filter by ERP code (contains)

Example: ERPCODE123
email_allowedbooleanOptional

Indicates if the customer allows receiving emails

Example: true
sms_allowedbooleanOptional

Indicates if the customer allows receiving SMS

Example: false
call_allowedbooleanOptional

Indicates if the customer allows receiving calls

Example: true
date_joinedstring · date-timeOptional

The date when the customer joined

Example: 2018-08-16T11:20:14.736995Z
genderstring · enumOptional

Filter by gender

Example: malePossible values:
user_typestring · enumOptional

Filter by user type

Example: guestPossible values:
date_of_birthstring · dateOptional

Filter by date of birth

Example: 1985-08-25
Responses
200
List of Sales Channel Customers with Details
application/json
get
GET /api/v1/channel/{channel_id}/customers/detailed/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
[
  {
    "pk": 123,
    "email": "[email protected]",
    "first_name": "John",
    "last_name": "Doe",
    "phone_number": "+123456789",
    "is_active": true,
    "channel_code": "CH123",
    "erp_code": "ERP456",
    "attributes": {
      "logged_ip": "127.0.0.1",
      "register_client_type": "default"
    },
    "attribute_kwargs": {},
    "localized_attributes": {},
    "localized_attribute_kwargs": {},
    "extra_field": {
      "key1": "value1",
      "key2": 100
    },
    "email_allowed": true,
    "sms_allowed": false,
    "call_allowed": true,
    "date_joined": "2023-01-15T10:30:00Z",
    "gender": "female",
    "user_type": "guest",
    "date_of_birth": "1985-08-25",
    "channel": 5
  }
]

Was this helpful?