Customer Services
All services related to customers are listed in this page.
GET
List Customers - Simple
GET
List Customers - SimpleThis service is used to retrieve a list of customers.
It has been added for the purpose of supporting business intelligence.
Path: /api/v1/oms/customers/list-simple/
Query Parameters
The following query parameters can be used to get the details of customers.
token
string
header
The API key of the customer account
Example Request
To get a simple list of all customers, a GET
request should be sent to the /api/v1/oms/customers/list-simple/
endpoint. In the headers, set the Authorization
header to include the token for authentication.
Here's an example of how to make the request in python:
import requests
url = "https://{domain_url}/api/v1/oms/customers/list-simple/"
token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"
headers = {
'Content-Type': 'application/json',
'Authorization': f'Token {token}'
}
response = requests.request('GET', url, headers=headers)
print(response.json())
Example Response (200 OK)
In a successful response with a status code of 200 OK, the API returns the details of the customers. The response body contains a JSON
object with the customers and their attributes such as ID, first name, last name etc.
These parameters are described in the following table.
id
integer
The primary key of the customer
created_date
date
The creation date of the customer
modified_date
date
The last modified date of the customer
omnitron_id
integer
The omnitron id of the customer
string
The email of the customer
first_name
string
The first name of the customer
last_name
string
The last name of the customer
phone_number
string
The phone number of the customer
erp_code
string
The partner customer code
channel
integer
The channel id of the customer
This example response serves as a reference to understand the structure and data format returned from this API service.
{
"count": 109,
"next": "https://{domain_url}/api/v1/oms/customers/list-simple/?page=2",
"previous": null,
"results": [
{
"id": 1,
"created_date": "2023-10-06T08:42:53.427023Z",
"modified_date": "2023-10-06T08:42:53.427050Z",
"omnitron_id": 55,
"email": "[email protected]",
"first_name": "Ali",
"last_name": "Test",
"phone_number": "05555554433",
"erp_code": null,
"channel": 1
},
{
"id": 2,
"created_date": "2023-09-05T13:36:59.653885Z",
"modified_date": "2023-09-05T13:36:59.653913Z",
"omnitron_id": 56,
"email": "[email protected]",
"first_name": "İpek",
"last_name": "Test",
"phone_number": "05555432100",
"erp_code": null,
"channel": 1
},
{
"id": 3,
"created_date": "2023-09-04T07:38:17.414588Z",
"modified_date": "2023-09-04T07:38:17.414615Z",
"omnitron_id": 57,
"email": "[email protected]",
"first_name": "Ahmet",
"last_name": "Test",
"phone_number": "05454545454",
"erp_code": null,
"channel": 1
},
{
"id": 4,
"created_date": "2023-08-16T07:46:00.912768Z",
"modified_date": "2023-09-13T11:20:37.500200Z",
"omnitron_id": 60,
"email": "[email protected]",
"first_name": "Tuğçe",
"last_name": "Test",
"phone_number": null,
"erp_code": null,
"channel": 1
},
{
"id": 5,
"created_date": "2023-08-07T11:36:47.556620Z",
"modified_date": "2023-08-07T11:36:47.556641Z",
"omnitron_id": 61,
"email": "[email protected]",
"first_name": "Veli",
"last_name": "Test",
"phone_number": "05550005555",
"erp_code": null,
"channel": 1
},
{
"id": 6,
"created_date": "2023-06-19T12:16:44.195162Z",
"modified_date": "2023-06-19T12:16:44.195190Z",
"omnitron_id": 66,
"email": "[email protected]",
"first_name": "Zeynep",
"last_name": "Test",
"phone_number": null,
"erp_code": null,
"channel": 1
},
{
"id": 7,
"created_date": "2023-06-19T08:38:45.560031Z",
"modified_date": "2023-06-19T08:38:45.560051Z",
"omnitron_id": 70,
"email": "[email protected]",
"first_name": "Mehmet",
"last_name": "Test",
"phone_number": "05556665544",
"erp_code": null,
"channel": 1
},
{
"id": 8,
"created_date": "2023-06-19T07:43:25.090872Z",
"modified_date": "2023-06-19T07:52:42.410357Z",
"omnitron_id": 81,
"email": "[email protected]",
"first_name": "Fatma",
"last_name": "Test",
"phone_number": "05555551122",
"erp_code": null,
"channel": 1
},
{
"id": 9,
"created_date": "2023-06-14T09:56:48.842924Z",
"modified_date": "2023-06-14T11:25:10.352066Z",
"omnitron_id": 101,
"email": "[email protected]",
"first_name": "Emre",
"last_name": "Test",
"phone_number": null,
"erp_code": null,
"channel": 1
},
{
"id": 10,
"created_date": "2023-06-06T08:39:22.332325Z",
"modified_date": "2023-06-09T11:10:00.248909Z",
"omnitron_id": 105,
"email": "[email protected]",
"first_name": "Yılmaz",
"last_name": "Test",
"phone_number": "05554440000",
"erp_code": null,
"channel": 1
}
]
}
OPTIONS
List Customers - Simple
OPTIONS
List Customers - SimpleThis service is used to retrieve API level details of customers.
Path: /api/v1/oms/customers/list-simple/
Query Parameters
The following query parameters can be used to get the details of the service.
token
string
header
The API key of the customer account
Example Request
To get API level details of the service, a OPTIONS
request should be sent to the /api/v1/oms/customers/list-simple/
endpoint. In the headers, set the Authorization
header to include the token for authentication.
Here's an example of how to make the request in python:
import requests
url = "https://{domain_url}/api/v1/oms/customers/list-simple/"
token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"
headers = {
'Content-Type': 'application/json',
'Authorization': f'Token {token}'
}
response = requests.request('OPTIONS', url, headers=headers)
print(response.json())
Example Response (200 OK)
In a successful response with a status code of 200 OK, it returns the api level details of the service. The response body contains a JSON
object with the name, rendering types, filtering attributes etc.
These parameters are described in the following table.
name
string
The name of the service
renders
list
The rendering types of the service
parses
list
The parsing types of the service
actions
json
The defined actions of the service
filters
list
The filtering attributes of the service
This example response serves as a reference to understand the structure and data format returned from this API service.
{
"name": "list-simple",
"renders": [
"application/json",
"text/csv",
"application/xls"
],
"parses": [
"application/json",
"application/x-www-form-urlencoded",
"multipart/form-data"
],
"actions": {
"GET": {
"id": {
"type": "integer",
"required": false,
"read_only": true,
"label": "ID"
},
"created_date": {
"type": "datetime",
"required": false,
"read_only": true,
"label": "Created date"
},
"modified_date": {
"type": "datetime",
"required": false,
"read_only": true,
"label": "Modified date"
},
"omnitron_id": {
"type": "integer",
"required": true,
"read_only": false,
"label": "Omnitron id",
"min_value": -2147483648,
"max_value": 2147483647
},
"email": {
"type": "email",
"required": true,
"read_only": false,
"label": "Email",
"max_length": 254
},
"first_name": {
"type": "string",
"required": false,
"read_only": false,
"label": "First name",
"max_length": 255
},
"last_name": {
"type": "string",
"required": false,
"read_only": false,
"label": "Last name",
"max_length": 255
},
"phone_number": {
"type": "string",
"required": false,
"read_only": false,
"label": "Phone number",
"max_length": 128
},
"erp_code": {
"type": "string",
"required": false,
"read_only": false,
"label": "Partner customer code",
"max_length": 64
},
"channel": {
"type": "pk field",
"required": false,
"read_only": false,
"label": "Channel"
}
}
},
"filters": [
{
"label": "Sort",
"field_name": "sort",
"type": "dropdown",
"lookup_expr": [
"exact"
],
"extra": {
"choices": [
[
"id",
"ID"
],
[
"-id",
"ID (descending)"
],
[
"modified_date",
"Modified Date"
],
[
"-modified_date",
"Modified Date (descending)"
]
],
"help_text": "",
"null_label": null,
"required": false
}
},
{
"label": "Id Gt",
"field_name": "id",
"type": "integer",
"lookup_expr": [
"gt"
],
"extra": {
"required": false
}
},
{
"label": "Id Gte",
"field_name": "id",
"type": "integer",
"lookup_expr": [
"gte"
],
"extra": {
"required": false
}
},
{
"label": "Id Lt",
"field_name": "id",
"type": "integer",
"lookup_expr": [
"lt"
],
"extra": {
"required": false
}
},
{
"label": "Id Lte",
"field_name": "id",
"type": "integer",
"lookup_expr": [
"lte"
],
"extra": {
"required": false
}
},
{
"label": "First Name",
"field_name": "first_name",
"type": "string",
"lookup_expr": [
"exact"
],
"extra": {
"required": false
}
},
{
"label": "Last Name",
"field_name": "last_name",
"type": "string",
"lookup_expr": [
"exact"
],
"extra": {
"required": false
}
},
{
"label": "Email",
"field_name": "email",
"type": "string",
"lookup_expr": [
"exact"
],
"extra": {
"required": false
}
},
{
"label": "Phone Number",
"field_name": "phone_number",
"type": "string",
"lookup_expr": [
"exact"
],
"extra": {
"required": false
}
},
{
"label": "Erp Code",
"field_name": "erp_code",
"type": "string",
"lookup_expr": [
"exact"
],
"extra": {
"required": false
}
},
{
"label": "Channel Id",
"field_name": "channel_id",
"type": "string",
"lookup_expr": [
"exact"
],
"extra": {
"required": false
}
},
{
"label": "Modified Date",
"field_name": "modified_date",
"type": "string",
"lookup_expr": [
"exact",
"gt",
"gte",
"lt",
"lte"
],
"extra": {
"required": false
}
}
]
}
Last updated
Was this helpful?