Users
Commerce API provides user actions from the /users endpoint. It consists of several endpoints and includes endpoints for managing user accounts such as creating, updating profiles and accessing user-specific data.
Register
Used for the user to register to the system. If the registration is successful, the user logs in. Cookies in Response must be sent in subsequent API requests.
Endpoint: POST /users/registration/
Request
In order to create a new user in the system, a request is sent to the endpoint given above using the header specified below and with the request body parameters.
Headers:
Content-Type: application/json
Body Parameters
Property | Data Type | Required | Descriptions |
first_name | string | true | The first name of the user. |
last_name | string | true | The last name of the user. |
string | true | The email of the user. | |
password | string | true | The password of the user. |
confirm | boolean | true | Privacy policy option. Must be true. |
Request Body
{
"first_name": "<name>",
"last_name": "<lastname>",
"email": "<email@email.com>",
"password": "<password>",
"confirm": true
}
Sample Request
import requests
url = "https://{customer_api_url}/users/registration/"
headers = {
'content-type': 'application/json',
}
response = requests.post(url, headers=headers)
print(response.text)
Response 201 Created
The key given in the returned response is used in transactions that require authorization in subsequent requests.
In the example usage, the Authorization key is added to the header, then the key returned in the Token + Response is added as the value.
Exp: “Authorization”: “Token 97c52cb69ed57ff37c04f69a8a15e687c6fdb57f”
{
"key": "97c52cb69ed57ff37c04f69a8a15e687c6fdb57f"
"redirect_url": null
}
Response Status Codes
- 201 Created: The request was successful and a new user was created. The response body contains a message indicating that the user was created successfully. Also, a token is returned which will be used for authentication.
- 400 Bad Request: The request was malformed or missing required parameters or the given email address already exists in the database.
- 401 Unauthorized: The requested user is not authorized to access the requested resource.
- 403 Forbidden: The server understands the request, but the client is not authorized to access the requested resource.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
Register SMS Otp
Used for the user to register to the system with sms otp. If the registration is successful, the user logs in. Cookies in Response must be sent in subsequent API requests. During the registration process, the settings must be activated for sms otp use via settings.
REST_REGISTER_VIEW = 'omnishop.users.views.RegisterSMSOtpView'
REST_AUTH_REGISTER_SERIALIZERS = {
'REGISTER_SERIALIZER': 'omnishop.users.resources.serializers.RegisterSMSOtpSerializer'
}
With the transfer of these settings to the settings, redirection to the otp stream takes place.
Endpoint: POST /users/registration/
Request
In order to create a new user in the system, a request is sent to the endpoint given above using the header specified below and with the request body parameters.
Headers:
Content-Type: application/json
Body Parameters
Property | Data Type | Required | Descriptions |
first_name | string | true | The first name of the user. |
last_name | string | true | The last name of the user. |
string | true | The email of the user. | |
password | string | true | The password of the user. |
phone | string | true | The phone number of the user. |
code | string | false | The user verification code |
resend | boolean | false | Resend information |
confirm | boolean | true | Privacy policy option. Must be true. |
Request Body
{
"first_name": "<name>",
"last_name": "<lastname>",
"email": "<email@email.com>",
"phone": "05555555555",
"password": "<password>",
"confirm": true
}
Sample Request
import requests
import json
url = "https://{customer_api_url}/users/registration/"
payload = json.dumps({
"first_name": "akitest_first_name",
"last_name": "akitest_last_name",
"password": "test_pass",
"email": "akitest@hotmail.com",
"phone": "05999999999",
"confirm": True
})
headers = {
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, data=payload)
print(response.text)
Response 202 Accepted
A verification key is sent to the relevant phone number along with the request.
Exp: Phone Number:05555145555 Message:Verification code: 604908
{
"first_name": "akitest_first_name",
"last_name": "akitest_last_name",
"email": "akitest@hotmail.com",
"email_allowed": false,
"sms_allowed": false,
"call_allowed": null,
"confirm": true,
"user_type": "registered",
"phone": "05999999999",
"attributes": {},
"resend": false
}
Headers: Content-Type: application/json Cookie:
Request Body
{
"first_name": "<name>",
"last_name": "<lastname>",
"email": "<email@email.com>",
"code": "<code>",
"phone": "05555555555",
"password": "<password>",
"confirm": true
}
Sample Request
import requests
import json
url = "https://{customer_api_url}/users/registration/"
payload = json.dumps({
"first_name": "akitest_first_name",
"last_name": "akitest_last_name",
"password": "test_pass",
"email": "akitest@hotmail.com",
"code": "754993",
"phone": "05999999999",
"confirm": True
})
headers = {
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, data=payload)
print(response.text)
Response 201 Created
{
"key": "50edc0283dee79ea3c30e43c252da492c9b97a2b"
}
Response Description
The key given in the returned response is used in transactions that require authorization in subsequent requests.
In the example usage, the Authorization key is added to the header, then the key returned in the Token + Response is added as the value.
Exp: “Authorization”: “Token 97c52cb69ed57ff37c04f69a8a15e687c6fdb57f”
Response Status Codes
- 201 Created: The request was successful and a new user was created. The response body contains a message indicating that the user was created successfully. Also, a token is returned which will be used for authentication.
- 202 Accepted: The request has been accepted for processing, but the processing has not been completed yet.
- 400 Bad Request: The request was malformed or missing required parameters or the given email address already exists in the database.
- 403 Forbidden: The server understands the request, but the client is not authorized to access the requested resource.
- 406 Not Acceptable: The server cannot produce a response matching the list of acceptable values defined in the request's headers.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
Note: If resend value set as “true” while sending the request then the verification code is sent again.
Request Body
{
"first_name": "akitest_first_name",
"last_name": "akitest_last_name",
"password": "test_pass",
"email": "4akitest@hotmail.com",
"phone": "05499999999",
"resend": true,
"confirm": true
}
Response 202 Accepted
{
}
Login
Used to facilitate the user’s log-in process. Cookies of the returned response must be stored by the client and sent with the next API requests.
Endpoint: POST /users/login/
Request
The credentials of the existing user in the system are used to authenticate the relevant user by giving the request body during the request.
Headers:
Content-Type: application/json
Body Parameters
Property | Data Type | Required | Descriptions |
string | true | The email of the user. | |
password | string | true | The password of the user. |
Request Body
{
"email": "<USER_EMAIL>",
"password": "<PASSWORD>"
}
Sample Request:
import requests
url = "https://{customer_api_url}/users/login/"
headers = {
'content-type': 'application/json',
}
response = requests.post(url, headers=headers)
print(response.text)
Response 200 OK
{
"key": "<A 40 character key>",
"redirect_url": null
}
Response Description
The key given in the returned response is used in transactions that require authorization in subsequent requests.
In the example usage, the Authorization key is added to the header, then the key returned in the Token + Response is added as the value.
Exp: “Authorization”: “Token 97c52cb69ed57ff37c04f69a8a15e687c6fdb57f”
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 400 Bad Request: The request was malformed or missing, false given required parameters.
- 401 Unauthorized: The requested user is not authorized to access the requested resource.
- 403 Forbidden: The server understands the request, but the client is not authorized to access the requested resource.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
Note: The key that returns as response is in fact the key established when creating a user.
Logout
Logs out the logged-in user.
Endpoint: ”POST /users/logout/$”
Request
It is used to delete the session data of the authenticated user in the system to be unauthenticated.
Headers: Content-Type: application/x-www-form-urlencoded’
Body Parameters:
Property | Data Type | Required | Descriptions |
csrfmiddlewaretoken | string | true | User csrf token must be given |
Request Body
csrfmiddlewaretoken=<csrf-token>
Sample Request
import requests
url = "https://{customer_api_url}/users/logout/"
payload='csrfmiddlewaretoken=<csrf-token>'
headers = {'Content-type': 'application/x-www-form-urlencoded',
'Cookie': csrftoken=<csrf-token>;sessionid=<session-id>}
response = requests.post(url, data=payload, headers=headers)
Response 200 OK None
Response Description
No response is returned as a result of the request. It is indicated by the 200 status code that the transition has been completed successfully and the user is unauthenticated.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 403 Forbidden: The server understands the request, but the client is not authorized to access the requested resource.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
Registration Email Verification Sent
Redirects to the email verification page.
Endpoint: GET /users/registration/account-email-verification-sent
Request
The registration email is sent using the endpoint above to confirm the email address and activate the account when the user registers in the system.
Headers: None Body Parameters:None Request Body: None
Sample Request
import requests
url = "https://{customer_api_url}/users/registration/account-email-verification-sent/"
headers = {
'Cookie': 'csrftoken=<csrf-token>; sessionid=<session_id>'
}
response = requests.get(url, headers=headers)
print(response.text)
Response 200 OK None
Response Description
No response is returned as a result of the request. It is seen that the process has been completed successfully and an email is sent to the user.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
Password Reset
If the specified email address is registered, a password reset email is sent.
Endpoint: POST /users/password/reset/
Request
If the email address entered in the request body is a registered email address, a password renewal email is sent to this email address.
Headers:
Content-Type: application/json
Body Parameters:
Property | Data Type | Required | Descriptions |
string | true | The user’s email |
Request Body
{
"email": "<USER_EMAIL>"
}
Sample Request
import requests
import json
url = "https://{customer_api_url}/users/password/reset/"
payload = json.dumps({
"email": "<USER_EMAIL>"
})
headers = {
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, data=payload)
print(response.text)
Response 200 OK
## {"success":"Şifre yenileme maili gönderildi."}
Response Description
Request has been processed successfully and the password reset email to the user is displayed with the status 200 OK code and the "success" key received in the response body.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 400 Bad Request: The request was malformed or missing, false given required parameters.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
Current User
Returns the information of logged in users. Current user’s information can be seen in the response content such as user pk, user first name, user last name, user email, etc.
Endpoint: GET /current_user/
Request:
Request does not take a body. A request is made with an authorization defined in the endpoint header given above.
Headers:
Authorization: Token
Content-Type: application/json
Body Parameters: None
Request Body: None
Sample Request
import requests
url = "https://{customer_api_url}/current_user/"
headers = {
'Authorization': 'Token <key>'
}
response = requests.get(url, headers=headers, data=payload)
print(response.text)
Response 200 OK
{
"pk": user.pk,
"first_name": <user-firstname>,
"last_name": <user_lastname>,
"phone": <user_phone>,
"email": <user_email>,
"Email_allowed": <send_user_email>,
"sms_allowed": <send_user_sms>,
"call_allowed": <call_user>,
"attributes": <user_attributes>,
"hashed_email": <user_hashed_email>,
"date_joined": <user_date_joined>,
"last_login": <user_last_login>,
"gender": <user_gender>,
"date_of_birth": <user_birth_date>,
"client_type": <client_type>,
"Selected_address": <selected_address>
}
Response Description
The request is processed successfully and the information of the user whose auth token is entered in the header is received in the response body.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 401 Unauthorized: The requested user is not authorized to access the requested resource.
- 405 Method Not Allowed: Wrong method type. The server knows the request method, but the target resource doesn't support this method.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
Password Change
Used to change the password for logged-in users.
Endpoint: POST /users/password/change/$
Request: With the request body created with the fields given in the body parameter, a password change request is sent to the endpoint specified above.
Headers:
Authorization: Token
Content-Type: application/json
Body Parameters
Property | Data Type | Required | Descriptions |
old_password | string | true | The old password of the user. |
new_password1 | string | true | The new password of the user. |
new_password2 | string | true | The new password of the user. |
Request Body
{
"old_password": "old_pass",
"new_password1": "new_pass",
"new_password2": "new_pass"
}
Sample Request
import requests
import json
url = "https://{customer_api_url}/users/password/change/"
payload = json.dumps({
"old_password": "oldpass",
"new_password1": "newpass",
"new_password2": "newpass"
})
headers = {
'Authorization': 'Token <key>,
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, data=payload)
print(response.text)
Response 200 OK
{
"success": "Yeni şifre kaydedildi."
}
Response Description
The response body that the request was processed successfully and the password of the user whose auth token was entered in the header was successfully changed.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 400 Bad Request: The request was malformed or missing, false given required parameters.
- 401 Unauthorized: The requested user is not authorized to access the requested resource.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
User Reset
Used to set a new password when the password reset email is sent.
Request POST
Path: /users/reset/<uidb64>/<token>/
Request
{
"new_password1": "<NEW_PASSWORD>",
"new_password2": "<NEW_PASSWORD>"
}
User Reset Done
Template returns when password reset is completed.
Request GET
Path: /users/reset/done/$
Contact Us
Used for the user to communicate with the relevant shop and to convey their wishes, suggestions and complaints.
Endpoint: POST /users/contact-us/
Request:
With the request body created with the fields given in the body parameter, a POST request is sent to the endpoint specified above, and the message of the user specified in the email is sent to the relevant shop.
Headers:
Content-Type: application/json
Body Parameters
Property | Data Type | Required | Descriptions |
subject | int | true | The subject ID. |
full_name | string | true | The full name of the user (Max length is 70) |
string | true | The email address of the user. | |
phone | string | false | The phone number of the user. (Max length is 70) |
message | string | true | The content of the contact reason. |
file | file | false | File (File format must be '.pdf', '.jpg', '.jpeg', '.png', '.xls', '.xlsx', '.doc', '.docx') |
order | int | false | The order ID. |
operation | string | false | The field which determines the value in “To” in Concant_Us_Email_To CONTACT_US_EMAIL_TO={'franchise': 'xx@doe.com', 'contact_us': 'y@doe.com'} Operation could be “franchise” or “contact_us” |
Request Body
{
"message": "<User Message Content>",
"email": "info@akinon.com",
"full_name": "Joe Doe",
"subject": "<SUBJECT_ID>"
}
Sample Request
import requests
import json
url = "https://{customer_api_url}/users/contact-us/"
payload = json.dumps({
"message": "test",
"email": "test@test.com",
"full_name": "testname",
"subject": 1
})
headers = {
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, data=payload)
print(response.text)
Response 200 OK
No response body.
Response Description
The response, in which the request is processed successfully, is seen with code 200 and the email is forwarded.
Response Status Codes:
- 200 OK: The request was successful and the requested resource is returned in the response.
- 400 Bad Request: The request was malformed or missing, false given required parameters.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
Contact Us Subjects
Displays the available subjects for the Contact Form. The contact us headers are listed with their IDs and their content and order_needed information presented.
Endpoint: GET /users/contact-us-subjects/$
Request:
To see and list the available titles for the contact form, a GET request is made to the endpoint mentioned above.
Headers: None Body Parameters: None
Request Body
None
Sample Request
import requests
url = "https://{customer_api_url}/users/contact-us-subjects/"
response = requests.get(url)
print(response.text)
Response 200 OK
{
"is_order_needed": true,
"text": "Sipariş Problemi",
"id": 1
},
{
"is_order_needed": false,
"text": "Ödeme Problemi",
"id": 2
}
Response Description
It is seen with response code 200 that the request was processed successfully and contact us headers are listed.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
User Profile
Returns the information of logged in users. Logged user’s information can be seen in the response content such as user pk, user first name, user last name, user email, user accepted language code, etc.
Endpoint: GET /users/profile/
Request
By using the Authorization token, the relevant user's information is accessed by sending a "GET" request to the endpoint given above.
Headers: Authorization: Token <key> Body Parameters: None Request Body: None
Sample Request
import requests
url = "https://{customer_api_url}/users/profile/"
headers = {
'Authorization': 'Token <key>'
}
response = requests.get(url, headers=headers)
print(response.text)
Response 200 OK
{
"id": 1,
"first_name": "Akinon",
"last_name": "Akinon",
"email_allowed": false,
"sms_allowed": false,
"call_allowed": false,
"avatar": null,
"email": "info@akinon.com",
"phone": "05555555555",
"date_of_birth": null,
"gender": null,
"genders": "male",
"language_code": "tr-tr",
"attributes": {}
}
Response Description
It is seen with the response code 200 that the request was processed successfully, and it is observed that the information of the user given with the Authorization key in the header is in the returned response.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 401 Unauthorized: The requested user is not authorized to access the requested resource.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
Updates the information of logged in users.
Endpoint: PATCH /users/profile/
Request
By using the Authorization token, the requested information of the relevant user is updated according to the information given in the request body by sending the endpoints "PATCH" request given above.
Headers:
Authorization: Token <key>
Content-Type: application/json
Body Parameters
Property | Data Type | Required | Descriptions |
first_name | string | false | The first name of the user. |
last_name | string | false | The last name of the user. |
email_allowed | boolean | false | User's permission to receive email |
sms_allowed | boolean | false | User's permission to receive sms |
call_allowed | boolean | false | User's permission to receive call |
avatar | image | false | Image size must be less than settings.FILE_UPLOAD_MAX_MEMORY_SIZE (exp. 5242880 bytes. Appx 5MB) |
phone | string | false | The user phone number |
date_of_birth | date | false | Birthday of the user |
gender | string | false | Gender of the user |
language_code | string | false | Preferred language of the user |
attributes | dict | false | The attributes of the user |
Request Body
{
"first_name": "User New Name"
}
Sample Request
import requests
import json
url = "https://{customer_api_url}/users/profile/"
payload = json.dumps({
"first_name": "User New Name"
})
headers = {
'Authorization': 'Token <key>,
'Content-Type': 'application/json'
}
response = requests.patch(url, headers=headers, data=payload)
print(response.text)
Response 200 OK
{
"id": 1,
"first_name": "User New Name",
"last_name": "Akinon",
"email_allowed": false,
"sms_allowed": false,
"call_allowed": false,
"avatar": null,
"email": "info@akinon.com",
"phone": "05555555555",
"date_of_birth": null,
"gender": null,
"genders": "male",
"language_code": "tr-tr",
"attributes": {}
}
Response Description
It is seen with the response code 200 that the request is processed successfully, and it is observed in the returned response that the requested information of the user given with the Authorization key in the header changes.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 401 Unauthorized: The requested user is not authorized to access the requested resource.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
Updates the information of logged in users
Endpoint: PUT /users/profile/
Request
By using the Authorization token, the information of the relevant user is updated according to the information given in the request body by sending a "PUT" request to the endpoint given above.
Headers:
Authorization: Token <key>
Content-Type: application/json’
Body Parameters
Property | Data Type | Required | Descriptions |
first_name | string | false | The first name of the user. |
last_name | string | false | The last name of the user. |
email_allowed | boolean | false | User's permission to receive email |
sms_allowed | boolean | false | User's permission to receive SMS |
call_allowed | boolean | false | User's permission to receive call |
avatar | image | false | Image size must be less than settings.FILE_UPLOAD_MAX_MEMORY_SIZE (exp. 5242880 bytes. Appx 5MB) |
phone | string | false | The user phone number |
date_of_birth | date | false | Birthday of the user |
gender | string | false | Gender of the user |
language_code | string | false | Preferred language of the user |
attributes | dict | false | The attributes of the user |
Request Body
{
"first_name": "User New Name",
"last_name": "User New Last Name",
"email_allowed": true,
"sms_allowed": true,
"call_allowed": true,
"avatar": File,
"phone": "05555555555",
"date_of_birth": "2000-10-10",
"gender": "male",
"language_code": "tr-tr",
"attributes": {}
}
Sample Request
import requests
url = "https://{customer_api_url}/users/profile/"
payload={'first_name': 'User New Name',
'last_name': 'User New Last Name',
'email_allowed': 'true',
'sms_allowed': 'true',
'call_allowed': 'true',
'phone': '05555555555',
'date_of_birth': '2000-10-10',
'gender': 'male',
'language_code': 'tr-tr',
'attributes': '{}'}
files=[
('avatar',('pp.jpeg',open('/path/test.jpeg','rb'),'image/jpeg'))
]
headers = {
'Authorization': 'Token <key>'
}
response = requests.put(url, headers=headers, data=payload, files=files)
print(response.text)
Response 200 OK
{
"id": 1,
"first_name": "User New Name",
"last_name": "User New Last Name",
"email_allowed": true,
"sms_allowed": true,
"call_allowed": true,
"avatar": "https://cdn-mgsm.akinon.net/profile_images/2099/01/01/1tese6f8-test-test-test-01874c5ae77d.jpg",
"email": "info@akinon.com",
"phone": "05555555555",
"date_of_birth": "2000-10-10",
"gender": null,
"genders": "male",
"language_code": "tr-tr",
"attributes": {}
}
Response Description
It is seen with the response code 200 that the request was processed successfully, and the returned response in which the information of the user given with the Authorization key in the header changes, is also observed.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 401 Unauthorized: The requested user is not authorized to access the requested resource.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
User Email Show
Returns e-mail information of the user.
Endpoint: GET /users/emails/$
Request
By using the Authorization token, the email information of the relevant user is displayed in the request body by sending a "GET" request to the endpoint given above.
Headers: Authorization: Token <key> Body Parameters: None
Request Body
None
Sample Request
import requests
url = "https://{customer_api_url}/users/emails/"
headers = {
'Authorization': 'Token <key>'
}
response = requests.get(url, headers=headers)
print(response.text)
Response 200 OK
{
"id": 2,
"email": "info@akinon.com",
"verified": true,
"primary": true,
"user": 1
}
Response Description
It is seen with the response code 200 that the request was processed successfully, and the email information of the user given with the Authorization key in the header is also seen in the response.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 401 Unauthorized: The requested user is not authorized to access the requested resource.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
User Email Change
Returns the primary email address of the user.
Endpoint: GET /users/email-change/$
Request
By using the Authorization token, the email information of the relevant user is displayed in the request body by sending a "GET" request to the endpoint given above.
Headers: Authorization: Token <key> Body Parameters: None
Request Body
None
Sample Request
import requests
url = "https://{customer_api_url}/users/email-change/"
headers = {
'Authorization': 'Token <key>'
}
response = requests.get(url, headers=headers)
print(response.text)
Response 200 OK
{
"id": 2,
"email": "info@akinon.com",
"verified": true,
"primary": true,
"user": 1
}
Response Description
It is seen with the response code 200 that the request was processed successfully, and the email information of the user given with the Authorization key in the header is also seen in the response.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 401 Unauthorized: The requested user is not authorized to access the requested resource.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
Changes the primary email address of the user.
Endpoint: POST /users/email-change/$
Request
By using the Authorization token, the user's primary email address is changed by sending a "POST" request to the endpoint given above with the request body containing the email information "email" and "password" values of the relevant user.
Headers: Authorization: Token <key>
Body Parameters
Property | Data Type | Required | Descriptions |
string | true | The email address of the user. | |
password | string | true | The password of the user. |
Request Body
{
"email":"test_info@akinon.com",
"password": "test.pass"
}
Sample Request
import requests
import json
url = "https://{customer_api_url}/users/email-change/"
payload = json.dumps({
"email": "test_info@akinon.com",
"password": "test.pass"
})
headers = {
'Authorization': 'Token <key>',
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, data=payload)
print(response.text)
Response 200 OK
{
"user": 1,
"email": "test_info@akinon.com"
}
Response Description
It is seen with the response code 200 that the request was processed successfully, and the email information of the user given with the Authorization key in the header is also seen in the response.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 401 Unauthorized: The requested user is not authorized to access the requested resource.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
User Email Verify
Sends a verification email to the user.
Request GET
Path: /users/email-verify/<signed_email>/ <user_id_key>/
User Email Set Primary
Sets the primary email address.
Request GET
Path: /users/email-set-primary/<signed_email>/<user_id_key>/
User Order List
Lists all orders of the user.
Endpoint: GET /users/orders/
Request
By using the Authorization token, all order information of the relevant user can be seen by sending a "GET" request to the endpoint given above.
Headers: Authorization: Token <key>
Body Parameters
None
Request Body
None
Sample Request
import requests
url = "https://{customer_api_url}/users/orders/"
headers = {
'Authorization': 'Token <key>'
}
response = requests.get(url, headers=headers)
print(response.text)
Response 200 OK
{
"count": 167,
"next": "https://{customer_api_url}/users/orders/?page=2",
"previous": null,
"results": [
{
"id": 388,
…
…
…
…
}
Response Description
It is seen with the response code 200 that the request was processed successfully, and the order information of the user given with the Authorization key in the header is also seen in the response.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 401 Unauthorized: The requested user is not authorized to access the requested resource.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
User Order Detail
Lists details of the user's order with the specified order ID.
Endpoint:GET /users/orders/<order-id>
Request
By using the authorization token, the relevant order information of the relevant user is displayed by sending a "GET" request to the endpoint given above.
Headers: Authorization: Token <key> Body Parameters: None
Request Body:
None
Sample Request
import requests
url = "https://{customer_api_url}/users/orders/<order-id>"
headers = {
'Authorization': 'Token <key>'
}
response = requests.get(url, headers=headers)
print(response.text)
Response 200 OK
{
"id": 1,
"status": {
"value": "200",
"label": "Bekliyor"
},
"currency": {
"value": "try",
"label": "TL"
},
"orderitem_set": [
{
"id": 485,
"status": {
"value": "200",
"label": "Bekliyor"
},
"price_currency": {
"value": "try",
"label": "TL"
},
"product": {
"pk": 4283,
"sku": "2672881068196",
"base_code": "1KPARF0006",
"name": "Repertoıre Room Spray 100 Ml",
"image": "https://cdn-mgsm.akinon.net/products/2017/01/23/6668/5a07411a-3ae7-4fa0-bec7-fb247bcf8a31.jpg",
"absolute_url": "/repertoire-room-spray-100-ml-violet/",
"attributes": {
"integration_ProductAtt12Desc": "%50 + %50 PROMOSYON",
"uretim_yeri": "TÜRKİYE",
"renk": "VIOLET",
"integration_ProductAtt03Desc": "2011/2012 KIŞ",
"erp_ProductAtt07Desc": "50+50 promosyon",
"erp_ProductAtt12Desc": "%50 + %50 PROMOSYON",
"unit_weight": "1000",
"unit_minimum_value": 1000,
"erp_ProductAtt18Desc": "Kozmetik Ev - Oda Spreyi",
"erp_ProductHierarchyLevel01": "KOZMETİK",
"erp_ProductAtt13Desc": "KOZMETİK %50+%50",
"erp_ProductAtt09Desc": "Oda Spreyi",
"erp_ProductAtt02Desc": "Kozmetik Ev",
"integration_ProductAtt15Desc": "%50+%20 PROMOSYON",
"integration_ProductAtt18Desc": "Kozmetik Ev - Oda Spreyi",
"test": "test1",
"filtre_renk1": "Mürdüm",
"erp_ProductAtt15Desc": "%50+%20 PROMOSYON",
"erp_ProductCode": "1KPARF0006317",
"integration_ProductAtt13Desc": "KOZMETİK %50+%50",
"integration_ProductAtt01Desc": "İÇ ALIM",
"erp_ProductAtt01Desc": "İÇ ALIM",
"erp_ProductHierarchyLevel02": "Kozmetik",
"integration_ProductAtt02Desc": "Kozmetik Ev",
"integration_ProductCode": "1KPARF0006317",
"integration_ProductAtt07Desc": "50+50 promosyon",
"is_unit_product": true,
"erp_ProductAtt03Desc": "2011/2012 KIŞ",
"integration_ProductAtt09Desc": "Oda Spreyi",
"unit_step_value": 300,
"integration_ProductHierarchyLevel01": "KOZMETİK",
"integration_ProductHierarchyLevel02": "Kozmetik",
"erp_ProductAtt25Desc": "TÜRKİYE",
"erp_color": "VIOLET",
"unit_reference_value": 1000
},
"attributes_kwargs": {
"erp_ProductHierarchyLevel01": {
"value": "KOZMETİK",
"data_type": "dropdown",
"label": "KOZMETİK"
},
"erp_ProductHierarchyLevel02": {
"value": "Kozmetik",
"data_type": "dropdown",
"label": "Kozmetik"
},
"renk": {
"value": "VIOLET",
"data_type": "dropdown",
"label": "VIOLET"
},
"integration_ProductHierarchyLevel02": {
"value": "Kozmetik",
"data_type": "dropdown",
"label": "Kozmetik"
},
"integration_ProductHierarchyLevel01": {
"value": "KOZMETİK",
"data_type": "dropdown",
"label": "KOZMETİK"
},
"erp_color": {
"value": "VIOLET",
"data_type": "dropdown",
"label": "VIOLET"
},
"test": {
"value": "test1",
"label": "test1"
},
"filtre_renk1": {
"value": "Mürdüm",
"data_type": "dropdown",
"label": "Mürdüm"
}
},
"form_schema": null,
"data_source": null,
"extra_attributes": {}
},
"is_cancelled": false,
"is_cancellable": true,
"is_refundable": false,
"cancellationrequest_set": [],
"active_cancellation_request": null,
"shipping_company": null,
"tracking_url": null,
"is_tradable": false,
"available_easy_return_shipping_companies": [],
"datasource_detailed": null,
"extra_product_stock_detailed": null,
"extra_product_price_detailed": null,
"created_date": "2021-05-24T08:26:12.213928Z",
"modified_date": "2021-05-24T08:26:12.213957Z",
"attributes": {},
"attributes_kwargs": {},
"localized_attributes": {},
"localized_attributes_kwargs": {},
"price": "11.87",
"tax_rate": "18.00",
"invoice_number": null,
"invoice_date": null,
"e_archive_url": null,
"tracking_number": null,
"retail_price": "47.47",
"image": null,
"extra_field": {
"price_extra_field": {},
"stock_extra_field": {}
},
"estimated_delivery_date": null,
"shipping_tracking_url": null,
"order": 388,
"parent": null,
"extra_product_price": null,
"extra_product_stock": null,
"datasource": null
}
],
"discountitem_set": [],
"is_cancelled": false,
"is_cancellable": true,
"is_refundable": false,
"shipping_address": {
"pk": 63,
"email": "testtest@test.com",
"phone_number": "05555555555",
"first_name": "Test",
"last_name": "Test",
"country": {
"pk": 1,
"is_active": true,
"name": "Türkiye",
"code": "tr",
"translations": null
},
"city": {
"pk": 13,
"is_active": true,
"name": "Adana",
"country": 1,
"translations": null,
"priority": null,
"postcode": null
},
"line": "Test test test",
"title": "Test",
"township": {
"pk": 271,
"is_active": true,
"name": "Test Name",
"city": 13,
"postcode": null
},
"district": {
"pk": 3978,
"is_active": true,
"name": "Test",
"city": 13,
"township": 271,
"postcode": null
},
"postcode": "61000",
"notes": null,
"company_name": "",
"tax_office": "",
"tax_no": "",
"e_bill_taxpayer": false,
"hash_data": "6800dd08a0d375b1d2016bbb3d6125f2",
"address_type": "customer",
"retail_store": null,
"remote_id": null,
"identity_number": null,
"extra_field": null,
"user": {
"pk": 1,
"username": "testtest",
"first_name": "",
"last_name": "",
"email": "testtest@test.com",
"is_active": true,
"date_joined": "2020-10-07T14:01:58.203597Z",
"last_login": "2022-02-28T08:31:10.538233Z",
"email_allowed": false,
"sms_allowed": true,
"call_allowed": false,
"gender": "male",
"attributes": {
"logged_ip": "61.61.61.61"
},
"phone": "05436011661",
"date_of_birth": null,
"attributes_kwargs": {},
"user_type": "registered",
"modified_date": null
},
"is_corporate": false,
"primary": false
},
"billing_address": {
"pk": 63,
"email": "testtest@test.com",
"phone_number": "05555555555",
"first_name": "Test",
"last_name": "TEst",
"country": {
"pk": 1,
"is_active": true,
"name": "Türkiye",
"code": "tr",
"translations": null
},
"city": {
"pk": 13,
"is_active": true,
"name": "Adana",
"country": 1,
"translations": null,
"priority": null,
"postcode": null
},
"line": "Test test test",
"title": "Test",
"township": {
"pk": 271,
"is_active": true,
"name": "Test Name",
"city": 13,
"postcode": null
},
"district": {
"pk": 3978,
"is_active": true,
"name": "KALDIRIM",
"city": 13,
"township": 271,
"postcode": null
},
"postcode": "61000",
"notes": null,
"company_name": "",
"tax_office": "",
"tax_no": "",
"e_bill_taxpayer": false,
"hash_data": "6800dd08a0d375b1d2016bbb3d6125f2",
"address_type": "customer",
"retail_store": null,
"remote_id": null,
"identity_number": null,
"extra_field": null,
"user": {
"pk": 414177,
"username": "testtest",
"first_name": "",
"last_name": "",
"email": "testtest@test.com",
"is_active": true,
"date_joined": "2020-10-07T14:01:58.203597Z",
"last_login": "2022-02-28T08:31:10.538233Z",
"email_allowed": false,
"sms_allowed": true,
"call_allowed": null,
"gender": "male",
"attributes": {},
"phone": "05555555555",
"date_of_birth": null,
"attributes_kwargs": {},
"user_type": "registered",
"modified_date": null
},
"is_corporate": false,
"primary": false
},
"shipping_company": null,
"client_type": "default",
"payment_option": {
"pk": 18,
"name": "Garanti Switch",
"payment_type": "saved_card",
"slug": "gswitch"
},
"amount_without_discount": "20.37",
"is_payable": false,
"tracking_url": null,
"bank": {
"pk": 5,
"name": "Garanti Bankası",
"slug": "garanti-bankas",
"logo": null
},
"created_date": "2021-05-24T08:26:12.205731Z",
"modified_date": "2021-05-24T08:26:12.205783Z",
"number": "1666226475313376",
"amount": "20.37",
"discount_amount": "0.00",
"shipping_amount": "8.50",
"shipping_tax_rate": null,
"refund_amount": "0.00",
"discount_refund_amount": "0.00",
"shipping_refund_amount": "0.00",
"invoice_number": null,
"invoice_date": null,
"e_archive_url": null,
"tracking_number": null,
"remote_addr": "61.61.61.61",
"has_gift_box": false,
"gift_box_note": null,
"language_code": "tr-tr",
"notes": null,
"delivery_range": null,
"extra_field": null,
"user_email": "testtest@test.com",
"shipping_option_slug": "ARAS",
"payment_option_slug": "gswitch",
"bin_number": "554960",
"installment_count": 1,
"installment_interest_amount": "0.00",
"shipping_tracking_url": null,
"user": 1,
"basket": 529,
"shipping_option": 1,
"card": 5,
"installment": 5,
"segment": null,
"checkout_provider": null
}
Response Description
It is seen with the response code 200 that the request was processed successfully, and the corresponding order information of the user given with the Authorization key in the header is also seen in the response.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 401 Unauthorized: The requested user is not authorized to access the requested resource.
- 404 Not Found: The order number with the given id could not be found.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
Display Return Items for Order Cancellation
This endpoint is used to list and display return items on the shop page.
Endpoint: GET
/users/orders/<pk>/cancellation/
- Headers: None
- Authorization: Token <key>
- Body Parameters: None
- Request Body: Null
Example Request
Using the Authorization token, it sends a request to display items eligible for return on the shop page by sending a "GET" request to the endpoint.
import requests
url = "https://{customer_api_url}/users/orders/<order-id>/cancellation/"
headers = {
'Authorization': 'Token <key>'
}
response = requests.get(url, headers=headers)
print(response.text)
Example Response (200 OK)
200 OK response indicated that the request to display items eligible for return was processed successfully.
{
"id": 388,
"status": {
"value": "200",
"label": "Bekliyor"
},
"currency": {
"value": "try",
"label": "TL"
},
"orderitem_set": [
…
…
…
}
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 401 Unauthorized: The requested user is not authorized to access the requested resource.
- 404 Not Found: The order number with the given id could not be found.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
User Order Cancellation List
Lists details of canceled user orders.
Endpoint: GET /users/orders/cancellation_requests/
Request
In order to list the canceled orders to the relevant user by using the Authorization token, a “GET” request is sent to the endpoint given above, and canceled user orders are seen.
Headers: Authorization: Token <key> Body Parameters: None Request Body:None
Sample Request
import requests
url = "https://{customer_api_url}/users/orders/cancellation_requests/"
headers = {
'Authorization': 'Token <key>'
}
response = requests.get(url, headers=headers)
print(response.text)
Response 200 OK
{
"count": 6,
"next": null,
"previous": null,
"results": [
{
"id": 6,
"cancellation_type": "cancel",
"status": {
"value": "open",
"label": "Open"
},
"easy_return": null,
"created_date": "2019-11-12T11:07:36.721777Z",
"modified_date": "2019-11-12T11:07:36.721806Z",
"uuid": "1a2b3456-7cd4-49bb-9bf4-9495e9af845d",
"description": "",
"iban": null,
"holder_name": null,
"reason": 2,
"order_item": 284
},
{
"id": 5,
"cancellation_type": "cancel",
"status": {
"value": "open",
"label": "Open"
},
"easy_return": null,
"created_date": "2019-11-12T11:05:32.022364Z",
"modified_date": "2019-11-12T11:05:32.022422Z",
"uuid": "1a2b3456-7cd4-49bb-9bf4-9495e9af845d",
"description": "",
"iban": null,
"holder_name": null,
"reason": 2,
"order_item": 285
},
{
"id": 1,
"cancellation_type": "cancel",
"status": {
"value": "open",
"label": "Open"
},
"easy_return": null,
"created_date": "2019-09-17T12:52:22.640717Z",
"modified_date": "2019-09-17T12:52:22.640747Z",
"uuid": "1a4c39e2-e248-4284-bac7-49ffae65fa05",
"description": "",
"iban": null,
"holder_name": null,
"reason": 2,
"order_item": 271
},
{
"id": 4,
"cancellation_type": "cancel",
"status": {
"value": "open",
"label": "Open"
},
"easy_return": null,
"created_date": "2019-11-12T07:34:48.977546Z",
"modified_date": "2019-11-12T07:34:48.977582Z",
"uuid": "8a8417d9-8dda-4ee6-b0fa-2efcb669bcff",
"description": "",
"iban": null,
"holder_name": null,
"reason": 2,
"order_item": 287
},
{
"id": 3,
"cancellation_type": "cancel",
"status": {
"value": "open",
"label": "Open"
},
"easy_return": null,
"created_date": "2019-11-12T07:30:15.955700Z",
"modified_date": "2019-11-12T07:30:15.955729Z",
"uuid": "5930a8a0-0d15-4cbc-8511-684bd0cf63f7",
"description": "",
"iban": null,
"holder_name": null,
"reason": 2,
"order_item": 288
},
{
"id": 2,
"cancellation_type": "cancel",
"status": {
"value": "open",
"label": "Open"
},
"easy_return": null,
"created_date": "2019-11-12T07:29:00.188566Z",
"modified_date": "2019-11-12T07:29:00.188594Z",
"uuid": "d973d7ed-a76f-4b32-900e-bf186a369406",
"description": "",
"iban": null,
"holder_name": null,
"reason": 2,
"order_item": 291
}
]
}
Response Description
It is seen with the response code 200 that the request was processed successfully.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 401 Unauthorized: The requested user is not authorized to access the requested resource.
- 404 Not Found: The order number with the given id could not be found.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
User Order Bulk Cancellation
Lists details of canceled user orders.
Endpoint: POST /users/orders/bulk_cancellation_requests/
Request
In order to collectively cancel orders for the relevant user by using the Authorization token, it is seen that the order canceled is made in bulk by sending a “POST” request to the endpoint given above.
Headers: Authorization: Token <key> Content-Type : application/json
Body Parameters
Property | Data Type | Required | Descriptions |
cancellation | enum | true | Type of cancellations. |
status | enum | true | Type of status |
order_item | int | true | Order id from the db. |
easy_return | int | false | Easy return object |
shipping_company | int | false | Shipping Company Object |
reason | int | true | Cancellation reason id from db |
description | string | false | Description text |
iban | string | false | Iban number |
holder_name | string | false | The holder name |
Request Body
{
"cancel_order_items": [
{
"order_item": 271,
"reason": 3,
"cancellation_type": "refund"
}
]
}
Sample Request
import requests
import json
url = "https://{customer_api_url}/users/orders/bulk_cancellation_requests/"
payload = json.dumps({
"cancel_order_items": [
{
"order_item": 271,
"reason": 3,
"cancellation_type": "refund"
}
]
})
headers = {
'Authorization': 'Token <key>',
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, data=payload)
print(response.text)
Response 201 Created
[
{
"id": 18,
"cancellation_type": "refund",
"status": {
"value": "open",
"label": "Open"
},
"easy_return": null,
"created_date": "2023-01-16T19:39:35.592560Z",
"modified_date": "2023-01-16T19:39:35.592575Z",
"uuid": "62eeea09-2f48-4db8-9ca5-83168a8647e6",
"description": null,
"iban": null,
"holder_name": null,
"reason": 3,
"order_item": 271
}
]
Response Description
It is seen with the 201 created response code that the discarded request has been processed successfully and the cancellation request procedure has started.
Response Status Codes
- 201 Created: The request indicates that a new resource has been successfully created.
- 401 Unauthorized: The requested user is not authorized to access the requested resource.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
User Order Cancellation Reason List
Lists cancellation reasons.
Endpoint: GET /users/orders/cancellation_reasons/
Request
It is seen with the 200 OK response code that the cancellation reason list of the relevant user is returned by using the Authorization token.
Headers: Authorization: Token <key> Body Parameters: None Request Body:None
Sample Request
import requests
url = "https://{customer_api_url}/users/orders/cancellation_reasons/"
headers = {
'Authorization': 'Token <key>'
}
response = requests.get(url, headers=headers)
print(response.text)
Response 200 OK
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"cancellation_type": "cancel",
"translations": null,
"created_date": "2021-05-28T08:26:58.140000Z",
"modified_date": "2021-05-28T08:27:01.826000Z",
"uuid": "cfce77a6-14cb-489c-b81f-72d565529737",
"subject": "Yanlış Ürün Aldım",
"extra_information_needed": false,
"order": 100,
"is_active": true
}
]
}
Response Description
It is seen with the response code 200 that the request was processed successfully.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 401 Unauthorized: The requested user is not authorized to access the requested resource.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
User Unauthenticated Orders List
Lists orders submitted without logging in.
Endpoint: GET /users/orders/anonymous?email=<email>&number=<order number>
Request
Email and order number information is given as parameters to return the list of orders belonging to the relevant user without using the Authorization token.
Headers: None Body Parameters: None Request Body: None
Sample Request
import requests
url = "https://{customer_api_url}/users/orders/anonymous?email=test_8@akinon.com&number=1666226475313376"
response = requests.get(url)
print(response.text)
Response 200 OK
[
{
"id": 388,
"status": {
"value": "200",
"label": "Bekliyor"
},
"currency": {
"value": "try",
"label": "TL"
},
"orderitem_set": [
{
"id": 485,
"status": {
"value": "200",
"label": "Bekliyor"
},
"price_currency": {
"value": "try",
"label": "TL"
},
"product": {
"pk": 4283,
"sku": "2672881068196",
"base_code": "1KPARF0006",
"name": "Repertoıre Room Spray 100 Ml",
"image": "https://cdn-mgsm.akinon.net/products/2017/01/23/6668/5a07411a-3ae7-4fa0-bec7-fb247bcf8a31.jpg",
"absolute_url": "/repertoire-room-spray-100-ml-violet/",
"attributes": {
"integration_ProductAtt12Desc": "%50 + %50 PROMOSYON",
"uretim_yeri": "TÜRKİYE",
"renk": "VIOLET",
"integration_ProductAtt03Desc": "2011/2012 KIŞ",
"erp_ProductAtt07Desc": "50+50 promosyon",
"erp_ProductAtt12Desc": "%50 + %50 PROMOSYON",
"unit_weight": "1000",
"unit_minimum_value": 1000,
"erp_ProductAtt18Desc": "Kozmetik Ev - Oda Spreyi",
"erp_ProductHierarchyLevel01": "KOZMETİK",
"erp_ProductAtt13Desc": "KOZMETİK %50+%50",
"erp_ProductAtt09Desc": "Oda Spreyi",
"erp_ProductAtt02Desc": "Kozmetik Ev",
"integration_ProductAtt15Desc": "%50+%20 PROMOSYON",
"integration_ProductAtt18Desc": "Kozmetik Ev - Oda Spreyi",
"test": "test1",
"filtre_renk1": "Mürdüm",
"erp_ProductAtt15Desc": "%50+%20 PROMOSYON",
"erp_ProductCode": "1KPARF0006317",
"integration_ProductAtt13Desc": "KOZMETİK %50+%50",
"integration_ProductAtt01Desc": "İÇ ALIM",
"erp_ProductAtt01Desc": "İÇ ALIM",
"erp_ProductHierarchyLevel02": "Kozmetik",
"integration_ProductAtt02Desc": "Kozmetik Ev",
"integration_ProductCode": "1KPARF0006317",
"integration_ProductAtt07Desc": "50+50 promosyon",
"is_unit_product": true,
"erp_ProductAtt03Desc": "2011/2012 KIŞ",
"integration_ProductAtt09Desc": "Oda Spreyi",
"unit_step_value": 300,
"integration_ProductHierarchyLevel01": "KOZMETİK",
"integration_ProductHierarchyLevel02": "Kozmetik",
"erp_ProductAtt25Desc": "TÜRKİYE",
"erp_color": "VIOLET",
"unit_reference_value": 1000
},
"attributes_kwargs": {
"erp_ProductHierarchyLevel01": {
"value": "KOZMETİK",
"data_type": "dropdown",
"label": "KOZMETİK"
},
"erp_ProductHierarchyLevel02": {
"value": "Kozmetik",
"data_type": "dropdown",
"label": "Kozmetik"
},
"renk": {
"value": "VIOLET",
"data_type": "dropdown",
"label": "VIOLET"
},
"integration_ProductHierarchyLevel02": {
"value": "Kozmetik",
"data_type": "dropdown",
"label": "Kozmetik"
},
"integration_ProductHierarchyLevel01": {
"value": "KOZMETİK",
"data_type": "dropdown",
"label": "KOZMETİK"
},
"erp_color": {
"value": "VIOLET",
"data_type": "dropdown",
"label": "VIOLET"
},
"test": {
"value": "test1",
"label": "test1"
},
"filtre_renk1": {
"value": "Mürdüm",
"data_type": "dropdown",
"label": "Mürdüm"
}
},
"form_schema": null,
"data_source": null,
"extra_attributes": {}
},
"is_cancelled": false,
"is_cancellable": true,
"is_refundable": false,
"cancellationrequest_set": [
{
"id": 13,
"cancellation_type": {
"value": "cancel",
"label": "İptal"
},
"status": {
"value": "open",
"label": "Open"
},
"easy_return": null,
"created_date": "2023-01-16T16:06:03.249582Z",
"modified_date": "2023-01-16T16:06:03.249598Z",
"uuid": "fee6696f-16ba-4a05-986e-52bb617f45c5",
"description": null,
"iban": null,
"holder_name": null,
"reason": 1,
"order_item": 485
}
],
"active_cancellation_request": {
"id": 13,
"cancellation_type": {
"value": "cancel",
"label": "İptal"
},
"status": {
"value": "open",
"label": "Open"
},
"easy_return": null,
"created_date": "2023-01-16T16:06:03.249582Z",
"modified_date": "2023-01-16T16:06:03.249598Z",
"uuid": "fee6696f-16ba-4a05-986e-52bb617f45c5",
"description": null,
"iban": null,
"holder_name": null,
"reason": 1,
"order_item": 485
},
"shipping_company": null,
"tracking_url": null,
"is_tradable": false,
"available_easy_return_shipping_companies": [],
"datasource_detailed": null,
"extra_product_stock_detailed": null,
"extra_product_price_detailed": null,
"created_date": "2021-05-24T08:26:12.213928Z",
"modified_date": "2021-05-24T08:26:12.213957Z",
"attributes": {},
"attributes_kwargs": {},
"localized_attributes": {},
"localized_attributes_kwargs": {},
"price": "11.87",
"tax_rate": "18.00",
"invoice_number": null,
"invoice_date": null,
"e_archive_url": null,
"tracking_number": null,
"retail_price": "47.47",
"image": null,
"extra_field": {
"price_extra_field": {},
"stock_extra_field": {}
},
"estimated_delivery_date": null,
"shipping_tracking_url": null,
"order": 388,
"parent": null,
"extra_product_price": null,
"extra_product_stock": null,
"datasource": null
}
],
"discountitem_set": [],
"is_cancelled": false,
"is_cancellable": true,
"is_refundable": false,
"shipping_address": {
"pk": 63,
"email": "testtest@test.com",
"phone_number": "05555555555",
"first_name": "Test",
"last_name": "TEst",
"country": {
"pk": 1,
"is_active": true,
"name": "Türkiye",
"code": "tr",
"translations": null
},
"city": {
"pk": 13,
"is_active": true,
"name": "Adana",
"country": 1,
"translations": null,
"priority": null,
"postcode": null
},
"line": "Test test test",
"title": "Test",
"township": {
"pk": 271,
"is_active": true,
"name": "test",
"city": 13,
"postcode": null
},
"district": {
"pk": 3978,
"is_active": true,
"name": "test",
"city": 13,
"township": 271,
"postcode": null
},
"postcode": "61000",
"notes": null,
"company_name": "",
"tax_office": "",
"tax_no": "",
"e_bill_taxpayer": false,
"hash_data": "6800dd08a0d375b1d2016bbb3d6125f2",
"address_type": "customer",
"retail_store": null,
"remote_id": null,
"identity_number": null,
"extra_field": null,
"user": {
"pk": 414177,
"username": "testtest",
"first_name": "",
"last_name": "",
"email": "testtest@test.com",
"is_active": true,
"date_joined": "2020-10-07T14:01:58.203597Z",
"last_login": "2022-02-28T08:31:10.538233Z",
"email_allowed": false,
"sms_allowed": true,
"call_allowed": null,
"gender": "male",
"attributes": {
"logged_ip": "61.61.61.61"
},
"phone": "05555555555",
"date_of_birth": null,
"attributes_kwargs": {},
"user_type": "registered",
"modified_date": null
},
"is_corporate": false,
"primary": false
},
"billing_address": {
"pk": 63,
"email": "testtest@test.com",
"phone_number": "05555555555",
"first_name": "Test",
"last_name": "TEst",
"country": {
"pk": 1,
"is_active": true,
"name": "Türkiye",
"code": "tr",
"translations": null
},
"city": {
"pk": 13,
"is_active": true,
"name": "Adana",
"country": 1,
"translations": null,
"priority": null,
"postcode": null
},
"line": "Test test test",
"title": "Test",
"township": {
"pk": 271,
"is_active": true,
"name": "test",
"city": 13,
"postcode": null
},
"district": {
"pk": 3978,
"is_active": true,
"name": "test",
"city": 13,
"township": 271,
"postcode": null
},
"postcode": "61000",
"notes": null,
"company_name": "",
"tax_office": "",
"tax_no": "",
"e_bill_taxpayer": false,
"hash_data": "6800dd08a0d375b1d2016bbb3d6125f2",
"address_type": "customer",
"retail_store": null,
"remote_id": null,
"identity_number": null,
"extra_field": null,
"user": {
"pk": 414177,
"username": "testtest",
"first_name": "",
"last_name": "",
"email": "testtest@test.com",
"is_active": true,
"date_joined": "2020-10-07T14:01:58.203597Z",
"last_login": "2022-02-28T08:31:10.538233Z",
"email_allowed": false,
"sms_allowed": true,
"call_allowed": null,
"gender": "male",
"attributes": {
"logged_ip": "61.61.61.61"
},
"phone": "05436011661",
"date_of_birth": null,
"attributes_kwargs": {},
"user_type": "registered",
"modified_date": null
},
"is_corporate": false,
"primary": false
},
"shipping_company": null,
"client_type": "default",
"payment_option": {
"pk": 18,
"name": "Garanti Switch",
"payment_type": "saved_card",
"slug": "gswitch"
},
"amount_without_discount": "20.37",
"is_payable": false,
"tracking_url": null,
"bank": {
"pk": 5,
"name": "Garanti Bankası",
"slug": "garanti-bankas",
"logo": null
},
"created_date": "2021-05-24T08:26:12.205731Z",
"modified_date": "2021-05-24T08:26:12.205783Z",
"number": "1666226475313376",
"amount": "20.37",
"discount_amount": "0.00",
"shipping_amount": "8.50",
"shipping_tax_rate": null,
"refund_amount": "0.00",
"discount_refund_amount": "0.00",
"shipping_refund_amount": "0.00",
"invoice_number": null,
"invoice_date": null,
"e_archive_url": null,
"tracking_number": null,
"remote_addr": "61.61.61.61",
"has_gift_box": false,
"gift_box_note": null,
"language_code": "tr-tr",
"notes": null,
"delivery_range": null,
"extra_field": null,
"user_email": "testtest@test.com",
"shipping_option_slug": "ARAS",
"payment_option_slug": "gswitch",
"bin_number": "554960",
"installment_count": 1,
"installment_interest_amount": "0.00",
"shipping_tracking_url": null,
"user": 1,
"basket": 529,
"shipping_option": 1,
"card": 5,
"installment": 5,
"segment": null,
"checkout_provider": null
}
]
Response Description
It is seen with the response code 200 that the request was processed successfully.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
Lists orders submitted without logging in.
Endpoint: POST /users/orders/anonymous?email=<email>&number<order number>
Request
In order to return the list of orders belonging to the relevant user without using the Authorization token, email and order number information is given in the request body.
Headers: None
Body Parameters
Property | Data Type | Required | Descriptions |
number | string | true | The order number. |
string | true | The order’s user email. |
Request Body
{
"number": "1666226475313376",
"email": "testtest@test.com"
}
Sample Request
import requests
import json
url = "https://{customer_api_url}/users/orders/anonymous?email=test_8@akinon.com&number=1666226475313376"
payload = json.dumps({
"number": "1666226475313376",
"email": "testtest@test.com"
})
headers = {
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response 200 OK
[
{
"id": 388,
"status": {
"value": "200",
"label": "Bekliyor"
},
"currency": {
"value": "try",
"label": "TL"
},
"orderitem_set": [
{
"id": 485,
"status": {
"value": "200",
"label": "Bekliyor"
},
"price_currency": {
"value": "try",
"label": "TL"
},
"product": {
"pk": 4283,
"sku": "2672881068196",
"base_code": "1KPARF0006",
"name": "Repertoıre Room Spray 100 Ml",
"image": "https://cdn-mgsm.akinon.net/products/2017/01/23/6668/5a07411a-3ae7-4fa0-bec7-fb247bcf8a31.jpg",
"absolute_url": "/repertoire-room-spray-100-ml-violet/",
"attributes": {
"integration_ProductAtt12Desc": "%50 + %50 PROMOSYON",
"uretim_yeri": "TÜRKİYE",
"renk": "VIOLET",
"integration_ProductAtt03Desc": "2011/2012 KIŞ",
"erp_ProductAtt07Desc": "50+50 promosyon",
"erp_ProductAtt12Desc": "%50 + %50 PROMOSYON",
"unit_weight": "1000",
"unit_minimum_value": 1000,
"erp_ProductAtt18Desc": "Kozmetik Ev - Oda Spreyi",
"erp_ProductHierarchyLevel01": "KOZMETİK",
"erp_ProductAtt13Desc": "KOZMETİK %50+%50",
"erp_ProductAtt09Desc": "Oda Spreyi",
"erp_ProductAtt02Desc": "Kozmetik Ev",
"integration_ProductAtt15Desc": "%50+%20 PROMOSYON",
"integration_ProductAtt18Desc": "Kozmetik Ev - Oda Spreyi",
"test": "test1",
"filtre_renk1": "Mürdüm",
"erp_ProductAtt15Desc": "%50+%20 PROMOSYON",
"erp_ProductCode": "1KPARF0006317",
"integration_ProductAtt13Desc": "KOZMETİK %50+%50",
"integration_ProductAtt01Desc": "İÇ ALIM",
"erp_ProductAtt01Desc": "İÇ ALIM",
"erp_ProductHierarchyLevel02": "Kozmetik",
"integration_ProductAtt02Desc": "Kozmetik Ev",
"integration_ProductCode": "1KPARF0006317",
"integration_ProductAtt07Desc": "50+50 promosyon",
"is_unit_product": true,
"erp_ProductAtt03Desc": "2011/2012 KIŞ",
"integration_ProductAtt09Desc": "Oda Spreyi",
"unit_step_value": 300,
"integration_ProductHierarchyLevel01": "KOZMETİK",
"integration_ProductHierarchyLevel02": "Kozmetik",
"erp_ProductAtt25Desc": "TÜRKİYE",
"erp_color": "VIOLET",
"unit_reference_value": 1000
},
"attributes_kwargs": {
"erp_ProductHierarchyLevel01": {
"value": "KOZMETİK",
"data_type": "dropdown",
"label": "KOZMETİK"
},
"erp_ProductHierarchyLevel02": {
"value": "Kozmetik",
"data_type": "dropdown",
"label": "Kozmetik"
},
"renk": {
"value": "VIOLET",
"data_type": "dropdown",
"label": "VIOLET"
},
"integration_ProductHierarchyLevel02": {
"value": "Kozmetik",
"data_type": "dropdown",
"label": "Kozmetik"
},
"integration_ProductHierarchyLevel01": {
"value": "KOZMETİK",
"data_type": "dropdown",
"label": "KOZMETİK"
},
"erp_color": {
"value": "VIOLET",
"data_type": "dropdown",
"label": "VIOLET"
},
"test": {
"value": "test1",
"label": "test1"
},
"filtre_renk1": {
"value": "Mürdüm",
"data_type": "dropdown",
"label": "Mürdüm"
}
},
"form_schema": null,
"data_source": null,
"extra_attributes": {}
},
"is_cancelled": false,
"is_cancellable": true,
"is_refundable": false,
"cancellationrequest_set": [
{
"id": 13,
"cancellation_type": {
"value": "cancel",
"label": "İptal"
},
"status": {
"value": "open",
"label": "Open"
},
"easy_return": null,
"created_date": "2023-01-16T16:06:03.249582Z",
"modified_date": "2023-01-16T16:06:03.249598Z",
"uuid": "fee6696f-16ba-4a05-986e-52bb617f45c5",
"description": null,
"iban": null,
"holder_name": null,
"reason": 1,
"order_item": 485
}
],
"active_cancellation_request": {
"id": 13,
"cancellation_type": {
"value": "cancel",
"label": "İptal"
},
"status": {
"value": "open",
"label": "Open"
},
"easy_return": null,
"created_date": "2023-01-16T16:06:03.249582Z",
"modified_date": "2023-01-16T16:06:03.249598Z",
"uuid": "fee6696f-16ba-4a05-986e-52bb617f45c5",
"description": null,
"iban": null,
"holder_name": null,
"reason": 1,
"order_item": 485
},
"shipping_company": null,
"tracking_url": null,
"is_tradable": false,
"available_easy_return_shipping_companies": [],
"datasource_detailed": null,
"extra_product_stock_detailed": null,
"extra_product_price_detailed": null,
"created_date": "2021-05-24T08:26:12.213928Z",
"modified_date": "2021-05-24T08:26:12.213957Z",
"attributes": {},
"attributes_kwargs": {},
"localized_attributes": {},
"localized_attributes_kwargs": {},
"price": "11.87",
"tax_rate": "18.00",
"invoice_number": null,
"invoice_date": null,
"e_archive_url": null,
"tracking_number": null,
"retail_price": "47.47",
"image": null,
"extra_field": {
"price_extra_field": {},
"stock_extra_field": {}
},
"estimated_delivery_date": null,
"shipping_tracking_url": null,
"order": 388,
"parent": null,
"extra_product_price": null,
"extra_product_stock": null,
"datasource": null
}
],
"discountitem_set": [],
"is_cancelled": false,
"is_cancellable": true,
"is_refundable": false,
"shipping_address": {
"pk": 63,
"email": "testtest@test.com",
"phone_number": "05555555555",
"first_name": "Test",
"last_name": "TEst",
"country": {
"pk": 1,
"is_active": true,
"name": "Türkiye",
"code": "tr",
"translations": null
},
"city": {
"pk": 13,
"is_active": true,
"name": "Adana",
"country": 1,
"translations": null,
"priority": null,
"postcode": null
},
"line": "Test test test",
"title": "Test",
"township": {
"pk": 271,
"is_active": true,
"name": "test",
"city": 13,
"postcode": null
},
"district": {
"pk": 3978,
"is_active": true,
"name": "test",
"city": 13,
"township": 271,
"postcode": null
},
"postcode": "61000",
"notes": null,
"company_name": "",
"tax_office": "",
"tax_no": "",
"e_bill_taxpayer": false,
"hash_data": "6800dd08a0d375b1d2016bbb3d6125f2",
"address_type": "customer",
"retail_store": null,
"remote_id": null,
"identity_number": null,
"extra_field": null,
"user": {
"pk": 414177,
"username": "testtest",
"first_name": "",
"last_name": "",
"email": "testtest@test.com",
"is_active": true,
"date_joined": "2020-10-07T14:01:58.203597Z",
"last_login": "2022-02-28T08:31:10.538233Z",
"email_allowed": false,
"sms_allowed": true,
"call_allowed": null,
"gender": "male",
"attributes": {
"logged_ip": "61.61.61.61"
},
"phone": "05555555555",
"date_of_birth": null,
"attributes_kwargs": {},
"user_type": "registered",
"modified_date": null
},
"is_corporate": false,
"primary": false
},
"billing_address": {
"pk": 63,
"email": "testtest@test.com",
"phone_number": "05555555555",
"first_name": "Test",
"last_name": "TEst",
"country": {
"pk": 1,
"is_active": true,
"name": "Türkiye",
"code": "tr",
"translations": null
},
"city": {
"pk": 13,
"is_active": true,
"name": "Adana",
"country": 1,
"translations": null,
"priority": null,
"postcode": null
},
"line": "Test test test",
"title": "Test",
"township": {
"pk": 271,
"is_active": true,
"name": "test",
"city": 13,
"postcode": null
},
"district": {
"pk": 3978,
"is_active": true,
"name": "test",
"city": 13,
"township": 271,
"postcode": null
},
"postcode": "61000",
"notes": null,
"company_name": "",
"tax_office": "",
"tax_no": "",
"e_bill_taxpayer": false,
"hash_data": "6800dd08a0d375b1d2016bbb3d6125f2",
"address_type": "customer",
"retail_store": null,
"remote_id": null,
"identity_number": null,
"extra_field": null,
"user": {
"pk": 414177,
"username": "testtest",
"first_name": "",
"last_name": "",
"email": "testtest@test.com",
"is_active": true,
"date_joined": "2020-10-07T14:01:58.203597Z",
"last_login": "2022-02-28T08:31:10.538233Z",
"email_allowed": false,
"sms_allowed": true,
"call_allowed": null,
"gender": "male",
"attributes": {
"logged_ip": "61.61.61.61"
},
"phone": "05436011661",
"date_of_birth": null,
"attributes_kwargs": {},
"user_type": "registered",
"modified_date": null
},
"is_corporate": false,
"primary": false
},
"shipping_company": null,
"client_type": "default",
"payment_option": {
"pk": 18,
"name": "Garanti Switch",
"payment_type": "saved_card",
"slug": "gswitch"
},
"amount_without_discount": "20.37",
"is_payable": false,
"tracking_url": null,
"bank": {
"pk": 5,
"name": "Garanti Bankası",
"slug": "garanti-bankas",
"logo": null
},
"created_date": "2021-05-24T08:26:12.205731Z",
"modified_date": "2021-05-24T08:26:12.205783Z",
"number": "1666226475313376",
"amount": "20.37",
"discount_amount": "0.00",
"shipping_amount": "8.50",
"shipping_tax_rate": null,
"refund_amount": "0.00",
"discount_refund_amount": "0.00",
"shipping_refund_amount": "0.00",
"invoice_number": null,
"invoice_date": null,
"e_archive_url": null,
"tracking_number": null,
"remote_addr": "61.61.61.61",
"has_gift_box": false,
"gift_box_note": null,
"language_code": "tr-tr",
"notes": null,
"delivery_range": null,
"extra_field": null,
"user_email": "testtest@test.com",
"shipping_option_slug": "ARAS",
"payment_option_slug": "gswitch",
"bin_number": "554960",
"installment_count": 1,
"installment_interest_amount": "0.00",
"shipping_tracking_url": null,
"user": 1,
"basket": 529,
"shipping_option": 1,
"card": 5,
"installment": 5,
"segment": null,
"checkout_provider": null
}
]
Response Description
It is seen with the response code 200 that the request was processed successfully.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
Old User Orders List
Lists completed orders.
Endpoint: GET /users/old-orders/$
Request
Returns a list of old orders for the user whose Authorization token information is given.
Headers: Authorization: Token Body Parameters: None Request Body: None
Sample Request
import requests
url = "https://{customer_api_url}/users/old-orders/"
headers = {
'Authorization': 'Token <key>'
}
response = requests.get(url, headers=headers)
print(response.text)
Response 200 OK
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 5,
"currency": {
"value": "try",
"label": "TL"
},
"shipping_company": null,
"oldorderitem_set": [],
"number": "12345",
"user_email": "test_8@akinon.com",
"status": "pasive",
"created_date": "2023-01-16T19:35:12.330019Z",
"amount": "10.00",
"discount_amount": "8.00",
"payment_type": "credit card",
"bank": "garanti",
"installment_count": 3,
"tracking_number": "testtrack123",
"shipping_address": "dene adress",
"billing_address": "deneme address",
"extra_field": {},
"user": 1
}
]
}
Response Description
As a result of the request, the old orders information of the user whose auth token is given can be displayed in the response body.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 401 Unauthorized: The requested user is not authorized to access the requested resource.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
User Old Order Detail
Details of completed orders.
Endpoint: GET /users/old-orders/<order-id>
Request
Returns the relevant old order value for the user whose Authorization token information is given.
Headers: Authorization: Token Body Parameters:None Request Body: None
Sample Request
import requests
url = "https://{customer_api_url}/users/old-orders/5"
headers = {
'Authorization': 'Token <key>'
}
response = requests.get(url, headers=headers)
print(response.text)
Response 200 OK
{
"id": 5,
"currency": {
"value": "try",
"label": "TL"
},
"shipping_company": null,
"oldorderitem_set": [],
"number": "12345",
"user_email": "test_8@akinon.com",
"status": "pasive",
"created_date": "2023-01-16T19:35:12.330019Z",
"amount": "10.00",
"discount_amount": "8.00",
"payment_type": "credit card",
"bank": "garanti",
"installment_count": 3,
"tracking_number": "testtrack123",
"shipping_address": "dene adress",
"billing_address": "deneme address",
"extra_field": {},
"user": 1
}
Response Description
As a result of the request, the relevant old order information of the user whose auth token is given is displayed in the response body.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 401 Unauthorized: The requested user is not authorized to access the requested resource.
- 404 Not Found: The order number with the given id could not be found.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
User List Stored Cards
Lists saved cards of the user.
Endpoint: GET /users/stored-cards/$
Request
Returns the registered credit card values for the user whose Authorization token information is given.
Headers: Authorization: Token Body Parameters: None Request Body: None
Sample Request
import requests
url = "https://{customer_api_url}/users/stored-cards/"
headers = {
'Authorization': 'Token <key>'
}
response = requests.get(url, headers=headers)
print(response.text)
Response 200 OK
{
"cards": [
"card_number": "555555******4444",
"card_identifier": "601d5fba-bc31-45a4-bf2b-2e24673c441c"
]
…
…
}
Response Description
As a result of the request, the relevant registered credit card information of the user whose auth token is given is displayed in the response body.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 400 Bad Request: The request was malformed or missing, false given required parameters.
- 401 Unauthorized: The requested user is not authorized to access the requested resource.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.
User Stored Card Detail
Lists card details.
Endpoint: GET /users/stored-cards/<card_identifier>
Request
Returns the registered credit card value for the user whose Authorization token information is given.
Headers: Authorization: Token Body Parameters: None Request Body: None
Sample Request
import requests
url = "https://{customer_api_url}/users/stored-cards/<card_identifier>"
headers = {
'Authorization': 'Token <key>'
}
response = requests.get(url, headers=headers)
print(response.text)
Response 200 OK None
Response Description
As a result of the request, the relevant registered credit card information of the user whose auth token is given is displayed in the response body.
Response Status Codes
- 200 OK: The request was successful and the requested resource is returned in the response.
- 400 Bad Request: The request was malformed or missing, false given required parameters.
- 401 Unauthorized: The requested user is not authorized to access the requested resource.
- 429 Too Many Requests: Made too many requests in a given amount of time and the server is rate limiting the request.
- 500 Internal Server Error: An unexpected error occurred on the server.