Get started
API Hakkında
• Lunatel API'yi kullanmak veya görüşlerinizi bizimle paylaşmak isterseniz lütfen bizimle info@lunatel.co adresi üzerinden iletişime geçiniz.
• API'yi kullanarak Lunatel express verilerine ulaşabilir ve kendi yazdığınız uygulamalar ile entegre edebilirsiniz. API vasıtasıyla Lunatel express Web arayüzü ile yapılan hemen her işlemi gerçekleştirebilirsiniz.
• API geliştirmesinde çoğunlukla JSONAPI http://jsonapi.org/ standartlarına uymaya çalıştık.
• Dökümantasyon oluşturulmasında ise OpenAPI-Swagger 6.0 kullandık.
• API hizmetimizin BASE_URLi https://api.lunatel.co/ şeklindedir.
Genel Bilgiler
• API V1 metodlarına erişmek için baz URL olarak https://api.lunatel.co/v1/ adresi kullanılır.
• İstekleri gönderirken Content-Type header'ı olarak application/json veya application/vnd.api+json göndermelisiniz.
login
Url: https://api.lunatel.co/v1/Auth/Login
REQUEST SAMPLES
{
"username": "string",
"password": "string",
"apiKey": "string"
}
RESPONSE SAMPLES
{
"authenticateResult": true,
"authToken": "string",
"accessTokenExpireDate": "2023-10-12T17:50:28.966Z",
"status": "0",
"errorResponse": {
"status": 0,
"message": "string"
}
REQUEST SAMPLES PARAMETERS
| Field |
Type |
Description |
| usurname |
String |
Your username. |
| password |
String |
Your password. |
| apiKey |
String [Required] |
Your api key.
|
RESPONSE SAMPLES PARAMETERS
| Field |
Type |
Description |
| authenticateResult |
Boolean |
Returns the result of identity corruption. |
| authToken |
String |
Returns tokens to enable subsequent transactions |
| accessTokenExpireDate |
Datetime |
Gives access key expiration date. |
| status |
Integer |
Return success code. |
| status(errorResponse) |
Integer |
Return error code. |
| message(errorResponse) |
String |
Return error message. |
sign up
Url: https://api.lunatel.co/v1/Auth/SignUp
REQUEST SAMPLES
{
"companyName": "string",
"companyTitle": "string",
"name": "string",
"surname": "string",
"userName": "string",
"email": "string",
"phone": "string",
"taxNumber": "string",
"taxUnit": "string",
"identificationNumber": "string",
"deliveryAddress": "string",
"invoiceAddress": "string",
"password": "string",
"passwordRetry": "string",
"isPerson": true,
"isDifferentInvoiceAddress": true,
"cityId": 0,
"districtId": 0,
"neighborhoodId": 0,
"userContract": true,
"privacyPolicy": true,
"kvkk": true,
"cookiePolicy": true,
"ipAdress": "string"
}
RESPONSE SAMPLES
{
"message": "string",
"status": 0,
"errorResponse": {
"status": 0,
"message": "string"
}
}
REQUEST SAMPLES PARAMETERS
| Field |
Type |
Description |
| companyName |
String [Required] |
Your company name. |
| companyTitle |
String [Required] |
Your company commerical name |
| name |
String [Required] |
Contact name. |
| surname |
String [Required] |
Contact surname. |
| userName |
String [Required] |
System username. |
| email |
String [Required] |
E-mail. |
| phone |
String [Required] |
Phone number. |
| taxNumber |
String [Required] |
Tax Number. |
| taxUnit |
String [Required] |
Tax unit name. |
| identificationNumber |
String |
(TCNO) Identification number. |
| deliveryAddress |
String [Required] |
Delivery address. |
| invoiceAddress |
String |
Invoice address. |
| password |
String [Required] |
System password. |
| passwordRetry |
String [Required] |
System password retry. |
| isPerson |
Boolean |
Is personel company or not.
|
| isDifferentInvoiceAddress |
Boolean |
Should the invoice be issued to the billing address? |
| cityId |
Integer [Required] |
City number. |
| districtId |
Integer [Required] |
District number. |
| neighborhoodId |
Integer [Required] |
Neighborhood number. |
| userContract |
Boolean |
Contracts.
|
| privacyPolicy |
Boolean |
Contracts.
|
| kvkk |
Boolean |
Contracts.
|
| cookiePolicy |
Boolean |
Contracts.
|
| ipAdress |
String [Required] |
Your ip address. |
| status |
String |
Return success code. |
| message |
String |
Return success message. |
| status(errorResponse) |
Integer |
Return error code. |
| message(errorResponse) |
String |
Return error message. |
RESPONSE SAMPLES PARAMETERS
| Field |
Type |
Description |
| message |
String |
Return success message. |
| status |
String |
Return success code. |
| status(errorResponse) |
Integer |
Return error code. |
| message(errorResponse) |
String |
Return error message. |
create address
Url: https://api.lunatel.co/v1/Address/Create
REQUEST SAMPLES
{
"addressTitle": "string",
"fullAdress": "string",
"cityID": 0,
"townID": 0,
"neighborhoodID": 0,
"name": "string",
"phoneNumber": "string",
"taxNumber": "string",
"taxUnit": "string",
"commercialTitle": "string",
"email": "string",
"invoiceAddress": "string",
"isDifferentInvoiceAddress": true
}
RESPONSE SAMPLES
{
"id": 0,
"response": "string",
"status": 0,
"errorResponse": {
"status": 0,
"message": "string"
}
}
REQUEST SAMPLES PARAMETERS
| Field |
Type |
Description |
| addressTitle |
String [Required] |
Address title. |
| fullAdress |
String [Required] |
Write the full address |
| cityID |
Integer [Required] |
City number.
|
| townID |
Integer [Required] |
Town number.
|
| neighborhoodID |
Integer [Required] |
Neighborhood number. |
| name |
String [Required] |
Contact name. |
| phoneNumber |
String [Required] |
Phone number. |
| taxNumber |
String [Required] |
Tax Number. |
| taxUnit |
String [Required] |
Tax unit name. |
| commercialTitle |
String [Required] |
Commerical title. |
| email |
String [Required] |
E-mail. |
| invoiceAddress |
String |
Invoice address. |
| isDifferentInvoiceAddress |
Boolean |
Should the invoice be issued to the billing address? |
RESPONSE SAMPLES PARAMETERS
| Field |
Type |
Description |
| id |
Integer |
ID of the created address. |
| response |
String |
Return message. |
| status |
Integer |
Return success code. |
| status(errorResponse) |
Integer |
Return error code. |
| message(errorResponse) |
String |
Return error message. |
edit address
Url: https://api.lunatel.co/v1/Address/Edit
REQUEST SAMPLES
{
"addressId": 0,
"addressTitle": "string",
"fullAdress": "string",
"cityID": 0,
"townID": 0,
"neighborhoodID": 0,
"name": "string",
"phoneNumber": "string",
"taxNumber": "string",
"taxUnit": "string",
"commercialTitle": "string",
"email": "string",
"invoiceAddress": "string",
"isDifferentInvoiceAddress": true
}
RESPONSE SAMPLES
{
"id": 0,
"response": "string",
"status": 0,
"errorResponse": {
"status": 0,
"message": "string"
}
}
REQUEST SAMPLES PARAMETERS
| Field |
Type |
Description |
| addressId |
Integer [Required] |
ID of the address you want to edit. |
| addressTitle |
String [Required] |
Address title. |
| fullAdress |
String [Required] |
Write the full address |
| cityID |
Integer [Required] |
City number.
|
| townID |
Integer [Required] |
Town number.
|
| neighborhoodID |
Integer [Required] |
Neighborhood number. |
| name |
String [Required] |
Contact name. |
| phoneNumber |
String [Required] |
Phone number. |
| taxNumber |
String [Required] |
Tax Number. |
| taxUnit |
String [Required] |
Tax unit name. |
| commercialTitle |
String [Required] |
Commerical title. |
| email |
String [Required] |
E-mail. |
| invoiceAddress |
String |
Invoice address. |
| isDifferentInvoiceAddress |
Boolean |
Should the invoice be issued to the billing address? |
RESPONSE SAMPLES PARAMETERS
| Field |
Type |
Description |
| id |
Integer |
ID of the edited address. |
| response |
String |
Return message. |
| status |
Integer |
Return success code. |
| status(errorResponse) |
Integer |
Return error code. |
| message(errorResponse) |
String |
Return error message. |
delete address
Url: https://api.lunatel.co/v1/Address/Delete
REQUEST SAMPLES
{
"addressId": 0
}
RESPONSE SAMPLES
{
"id": 0,
"response": "string",
"status": 0,
"errorResponse": {
"status": 0,
"message": "string"
}
}
REQUEST SAMPLES PARAMETERS
| Field |
Type |
Description |
| addressId |
Integer [Required] |
ID of the address you want to delete. |
RESPONSE SAMPLES PARAMETERS
| Field |
Type |
Description |
| id |
Integer |
ID of the edited address. |
| response |
String |
Return message. |
| status |
Integer |
Return success code. |
| status(errorResponse) |
Integer |
Return error code. |
| message(errorResponse) |
String |
Return error message. |
get address
Url: https://api.lunatel.co/v1/Address/GetAddress
REQUEST SAMPLES
{
No parameters...
}
RESPONSE SAMPLES
{
"status": 0,
"addressList": [
{
"id": 0,
"companyId": 0,
"title": "string",
"fullAddress": "string",
"cityId": 0,
"townId": 0,
"neighborhoodId": 0,
"cityname": "string",
"townname": "string",
"neighborhoodname": "string",
"name": "string",
"commericalTitle": "string",
"phoneNumber": "string",
"eMail": "string",
"taxNumber": "string",
"taxUnit": "string",
"invoiceAddress": "string"
}
],
"errorResponse": {
"status": 0,
"message": "string"
}
}
RESPONSE SAMPLES PARAMETERS
| Field |
Type |
Description |
| id |
Integer |
ID of the address. |
| companyId |
Integer |
ID of the companyId. |
| title |
String |
Address title. |
| fullAddress |
String |
Write the full address |
| cityId |
Integer |
City number.
|
| townId |
Integer |
Town number.
|
| neighborhoodId |
Integer |
Neighborhood number. |
| cityname |
String |
City name. |
| townname |
String |
Town name. |
| neighborhoodname |
String |
Neighborhood name. |
| name |
String |
Contact name. |
| commericalTitle |
String |
Commerical title. |
| phoneNumber |
String |
Phone number. |
| eMail |
String |
E-mail. |
| taxNumber |
String |
Tax Number. |
| taxUnit |
String |
Tax unit name. |
| invoiceAddress |
String |
Invoice address. |
| status |
Integer |
Return success code. |
| status(errorResponse) |
Integer |
Return error code. |
| message(errorResponse) |
String |
Return error message. |
get city
Url: https://api.lunatel.co/v1/Address/GetCitys
REQUEST SAMPLES
{
No parameters...
}
RESPONSE SAMPLES
{
"status": 0,
"list": [
{
"id": 0,
"cityName": "string"
}
],
"errorResponse": {
"status": 0,
"message": "string"
}
}
RESPONSE SAMPLES PARAMETERS
| Field |
Type |
Description |
| id |
Integer |
IDs of cities |
| cityName |
String |
Names of cities |
| status |
Integer |
Return success code. |
| status(errorResponse) |
Integer |
Return error code. |
| message(errorResponse) |
String |
Return error message. |
get town
Url: https://api.lunatel.co/v1/Address/GetTowns
REQUEST SAMPLES
{
"cityId": 0
}
RESPONSE SAMPLES
{
"status": 0,
"list": [
{
"id": 0,
"cityId": 0,
"townName": "string"
}
],
"errorResponse": {
"status": 0,
"message": "string"
}
}
REQUEST SAMPLES PARAMETERS
| Field |
Type |
Description |
| cityId |
Integer [Required] |
City id. |
RESPONSE SAMPLES PARAMETERS
| Field |
Type |
Description |
| id |
Integer |
IDs of towns. |
| cityId |
Integer |
City id
|
| townName |
String |
Names of towns.
|
| status |
Integer |
Return success code. |
| status(errorResponse) |
Integer |
Return error code. |
| message(errorResponse) |
String |
Return error message. |
get neıghborhood
Url: https://api.lunatel.co/v1/Address/GetNeighborhood
REQUEST SAMPLES
{
"townId": 0
}
RESPONSE SAMPLES
{
"status": 0,
"list": [
{
"id": 0,
"townID": 0,
"neigborhoodName": "string",
"zipCode": "string"
}
],
"errorResponse": {
"status": 0,
"message": "string"
}
}
REQUEST SAMPLES PARAMETERS
| Field |
Type |
Description |
| townId |
Integer [Required] |
Town id. |
RESPONSE SAMPLES PARAMETERS
| Field |
Type |
Description |
| id |
Integer |
IDs of neighborhood. |
| townId |
Integer |
Town id.
|
| neigborhoodName |
String |
Names of neigborhood.
|
| zipCode |
String |
Neighborhood zip code.
|
| status |
Integer |
Return success code. |
| status(errorResponse) |
Integer |
Return error code. |
| message(errorResponse) |
String |
Return error message. |
get sub categories
Url:https://api.lunatel.co/v1/Category/getSubCategories
REQUEST SAMPLES
{
No parameters...
}
RESPONSE SAMPLES
{
"status": 0,
"categoryList": [
{
"categoryId": 0,
"categoryName": "string",
"productCount": 0
}
],
"errorResponse": {
"status": 0,
"message": "string"
}
}
RESPONSE SAMPLES PARAMETERS
| Field |
Type |
Description |
| categoryId |
Integer |
Category id. |
| categoryName |
String |
CategoryName. |
| productCount |
int |
Total number of products in the category. |
| status |
Integer |
Return success code. |
| status(errorResponse) |
Integer |
Return error code. |
| message(errorResponse) |
String |
Return error message. |
get product master
Url:https://api.lunatel.co/v1/ProductMaster/getProductMasters
REQUEST SAMPLES
{
"categorySubId": 0
}
RESPONSE SAMPLES
{
"status": 0,
"productMasterList": [
{
"productMasterId": 0,
"productMasterName": "string",
"productCount": 0
}
],
"errorResponse": {
"status": 0,
"message": "string"
}
}
REQUEST SAMPLES PARAMETERS
| Field |
Type |
Description |
| categorySubId |
Integer |
Sub category id. |
RESPONSE SAMPLES PARAMETERS
| Field |
Type |
Description |
| productMasterId |
Integer |
Product Master id. |
| productMasterName |
String |
Product master name. |
| productCount |
int |
Total number of products in the category master. |
| status |
Integer |
Return success code. |
| status(errorResponse) |
Integer |
Return error code. |
| message(errorResponse) |
String |
Return error message. |
get product
Url:https://api.lunatel.co/v1/Product/getProduct
REQUEST SAMPLES
{
"count": 0,
"page": 0,
"getFavorite": true,
"productIds": "string",
"updatedDate" : [
"string"
]
}
RESPONSE SAMPLES
{
"status": 0,
"totalCount": 0,
"productModel": [
{
"productId": 0,
"minStockQty": 0,
"maxStockQty": 0,
"price": 0,
"discount": 0,
"basketDiscount": 0,
"tax": 0,
"productName": "string",
"brandName": "string",
"categoryName": "string",
"subCategoryName": "string",
"productMasterName": "string",
"categoryId": 0,
"subCategoryId": 0,
"productMasterId": 0,
"brandId": 0,
"productImageLink": "string",
"productImageLiteLink": "string",
"categoryImageLink": "string",
"categorySubImageLink": "string",
"expressId": 0,
"isFavorited": true,
"fastShipping": true,
"listPrice": 0,
"isHasCompanyPrice": true,
"unitName": "string",
"isUnitConvert": true
}
],
"errorResponse": {
"status": 0,
"message": "string"
}
}
REQUEST SAMPLES PARAMETERS
| Field |
Type |
Description |
| count |
Integer |
Number of rows to return. |
| page |
Integer |
Page number. |
| getFavorite |
Boolean |
Is it my favorite or not. |
| productIds |
String |
Please send the product IDs separated by commas. |
| updatedDate |
List<String> |
Filtering products by update date. |
- Use "eq" for updatedDate == filterDate
- Use "lt" for updatedDate < filterDate
- Use "gt" for updatedDate > filterDate
- Use "lteq" for updatedDate <= filterDate
- Use "gteq" for updatedDate >= filterDate
- For example, send the list like this [ "gt:2023-06-06" , "lt:2023-10-06" ]
RESPONSE SAMPLES PARAMETERS
| Field |
Type |
Description |
| productId |
Integer |
Product Ids. |
| minStockQty |
Float |
Min stock quantity. |
| maxStockQty |
Float |
Max stock quantity. |
| price |
Float |
Product price. |
| discount |
Float |
Discount rate. |
| basketDiscount |
Float |
Basket discount rate. |
| tax |
Float |
Tax rate. |
| productName |
String |
Product name. |
| brandName |
String |
Brand name. |
| categoryName |
String |
Category name. |
| subCategoryName |
String |
Sub category name. |
| productMasterName |
String |
Product Master Name. |
| categoryId |
Integer |
Category id. |
| subCategoryId |
Integer |
Sub Category id. |
| productMasterId |
Integer |
Product Master id. |
| brandId |
Integer |
Brand id. |
| productImageLink |
String |
Product Image Link. |
| productImageLiteLink |
String |
Product Image Lite Link. |
| categoryImageLink |
String |
Category Image Link. |
| categorySubImageLink |
String |
category Sub Image Link. |
| expressId |
Integer |
Product expressId. |
| isFavorited |
Boolean |
Returns whether the product is a favorite or not. |
| fastShipping |
Boolean |
gives whether it can be delivered quickly. |
| listPrice |
Float |
Gives the list price. |
| isHasCompanyPrice |
Boolean |
It tells you if there is a special price for your company. |
| unitName |
String |
Unit Name. |
| isUnitConvert |
Boolean |
Unit conversion status |
| status |
Integer |
Return success code. |
| totalCount |
Integer |
Total number of data. |
| status(errorResponse) |
Integer |
Return error code. |
| message(errorResponse) |
String |
Return error message. |
get product with product master
Url: https://api.lunatel.co/v1/Product/getProductWithProductMaster
REQUEST SAMPLES
{
"count": 0,
"page": 0,
"getFavorite": true,
"productMasterId": 0,
"updatedDate" : [
"string"
]
}
RESPONSE SAMPLES
{
"status": 0,
"productModel": [
{
"productId": 0,
"minStockQty": 0,
"maxStockQty": 0,
"price": 0,
"discount": 0,
"basketDiscount": 0,
"tax": 0,
"productName": "string",
"brandName": "string",
"categoryName": "string",
"subCategoryName": "string",
"productMasterName": "string",
"categoryId": 0,
"subCategoryId": 0,
"productMasterId": 0,
"brandId": 0,
"productImageLink": "string",
"productImageLiteLink": "string",
"categoryImageLink": "string",
"categorySubImageLink": "string",
"expressId": 0,
"isFavorited": true,
"fastShipping": true,
"listPrice": 0,
"isHasCompanyPrice": true,
"unitName": "string",
"isUnitConvert": true
}
],
"errorResponse": {
"status": 0,
"message": "string"
}
}
REQUEST SAMPLES PARAMETERS
| Field |
Type |
Description |
| count |
Integer |
Number of rows to return. |
| page |
Integer |
Page number. |
| getFavorite |
Boolean |
Is it my favorite or not. |
| productMasterId |
Integer [Required] |
Please send the product master id. |
| updatedDate |
List<String> |
Filtering products by update date. |
- Use "eq" for updatedDate == filterDate
- Use "lt" for updatedDate < filterDate
- Use "gt" for updatedDate > filterDate
- Use "lteq" for updatedDate <= filterDate
- Use "gteq" for updatedDate >= filterDate
- For example, send the list like this [ "gt:2023-06-06" , "lt:2023-10-06" ]
RESPONSE SAMPLES PARAMETERS
| Field |
Type |
Description |
| productId |
Integer |
Product Ids. |
| minStockQty |
Float |
Min stock quantity. |
| maxStockQty |
Float |
Max stock quantity. |
| price |
Float |
Product price. |
| discount |
Float |
Discount rate. |
| basketDiscount |
Float |
Basket discount rate. |
| tax |
Float |
Tax rate. |
| productName |
String |
Product name. |
| brandName |
String |
Brand name. |
| categoryName |
String |
Category name. |
| subCategoryName |
String |
Sub category name. |
| productMasterName |
String |
Product Master Name. |
| categoryId |
Integer |
Category id. |
| subCategoryId |
Integer |
Sub Category id. |
| productMasterId |
Integer |
Product Master id. |
| brandId |
Integer |
Brand id. |
| productImageLink |
String |
Product Image Link. |
| productImageLiteLink |
String |
Product Image Lite Link. |
| categoryImageLink |
String |
Category Image Link. |
| categorySubImageLink |
String |
category Sub Image Link. |
| expressId |
Integer |
Product expressId. |
| isFavorited |
Boolean |
Returns whether the product is a favorite or not. |
| fastShipping |
Boolean |
gives whether it can be delivered quickly. |
| listPrice |
Float |
Gives the list price. |
| isHasCompanyPrice |
Boolean |
It tells you if there is a special price for your company. |
| unitName |
String |
Unit Name. |
| isUnitConvert |
Boolean |
Unit conversion status |
| status |
Integer |
Return success code. |
| status(errorResponse) |
Integer |
Return error code. |
| message(errorResponse) |
String |
Return error message. |
get product with product sub category
Url:https://api.lunatel.co/v1/Product/getProductWithSubCategory
REQUEST SAMPLES
{
"count": 0,
"page": 0,
"getFavorite": true,
"subCategoryId": 0,
"updatedDate" : [
"string"
]
}
RESPONSE SAMPLES
{
"status": 0,
"productModel": [
{
"productId": 0,
"minStockQty": 0,
"maxStockQty": 0,
"price": 0,
"discount": 0,
"basketDiscount": 0,
"tax": 0,
"productName": "string",
"brandName": "string",
"categoryName": "string",
"subCategoryName": "string",
"productMasterName": "string",
"categoryId": 0,
"subCategoryId": 0,
"productMasterId": 0,
"brandId": 0,
"productImageLink": "string",
"productImageLiteLink": "string",
"categoryImageLink": "string",
"categorySubImageLink": "string",
"expressId": 0,
"isFavorited": true,
"fastShipping": true,
"listPrice": 0,
"isHasCompanyPrice": true,
"unitName": "string",
"isUnitConvert": true
}
],
"errorResponse": {
"status": 0,
"message": "string"
}
}
REQUEST SAMPLES PARAMETERS
| Field |
Type |
Description |
| count |
Integer |
Number of rows to return. |
| page |
Integer |
Page number. |
| getFavorite |
Boolean |
Is it my favorite or not. |
| subCategoryId |
Integer [Required] |
Please send the product sub category id. |
| updatedDate |
List<String> |
Filtering products by update date. |
- Use "eq" for updatedDate == filterDate
- Use "lt" for updatedDate < filterDate
- Use "gt" for updatedDate > filterDate
- Use "lteq" for updatedDate <= filterDate
- Use "gteq" for updatedDate >= filterDate
- For example, send the list like this [ "gt:2023-06-06" , "lt:2023-10-06" ]
RESPONSE SAMPLES PARAMETERS
| Field |
Type |
Description |
| productId |
Integer |
Product Ids. |
| minStockQty |
Float |
Min stock quantity. |
| maxStockQty |
Float |
Max stock quantity. |
| price |
Float |
Product price. |
| discount |
Float |
Discount rate. |
| basketDiscount |
Float |
Basket discount rate. |
| tax |
Float |
Tax rate. |
| productName |
String |
Product name. |
| brandName |
String |
Brand name. |
| categoryName |
String |
Category name. |
| subCategoryName |
String |
Sub category name. |
| productMasterName |
String |
Product Master Name. |
| categoryId |
Integer |
Category id. |
| subCategoryId |
Integer |
Sub Category id. |
| productMasterId |
Integer |
Product Master id. |
| brandId |
Integer |
Brand id. |
| productImageLink |
String |
Product Image Link. |
| productImageLiteLink |
String |
Product Image Lite Link. |
| categoryImageLink |
String |
Category Image Link. |
| categorySubImageLink |
String |
category Sub Image Link. |
| expressId |
Integer |
Product expressId. |
| isFavorited |
Boolean |
Returns whether the product is a favorite or not. |
| fastShipping |
Boolean |
gives whether it can be delivered quickly. |
| listPrice |
Float |
Gives the list price. |
| isHasCompanyPrice |
Boolean |
It tells you if there is a special price for your company. |
| unitName |
String |
Unit Name. |
| isUnitConvert |
Boolean |
Unit conversion status |
| status |
Integer |
Return success code. |
| status(errorResponse) |
Integer |
Return error code. |
| message(errorResponse) |
String |
Return error message. |
favorite toggle
Url: https://api.lunatel.co/v1/Product/favoriteToggle
REQUEST SAMPLES
{
"productId": 0
}
RESPONSE SAMPLES
{
"status": 0,
"message": "string",
"errorResponse": {
"status": 0,
"message": "string"
}
}
REQUEST SAMPLES PARAMETERS
| Field |
Type |
Description |
| productId [Required] |
Integer |
Product id to be favorited or not. |
RESPONSE SAMPLES PARAMETERS
| Field |
Type |
Description |
| status |
Integer |
Return success code. |
| message |
String |
Return success message. |
| status(errorResponse) |
Integer |
Return error code. |
| message(errorResponse) |
String |
Return error message. |
post order
Url: https://api.lunatel.co/v1/Order/postOrder
REQUEST SAMPLES
{
"note": "string",
"deliveryAddressId": 0,
"ipAddress": "string",
"orderItems": [
{
"productId": 0,
"quantity": 0
}
]
}
RESPONSE SAMPLES
{
"message": "string",
"status": 0,
"errorResponse": {
"status": 0,
"message": "string"
}
}
REQUEST SAMPLES PARAMETERS
| Field |
Type |
Description |
| note |
String |
Order note can be entered. |
| deliveryAddressId |
Integer [Required] |
Order delivery address ID will be entered. |
| ipAddress |
String [Required] |
Your ip address. |
| productId |
Integer [Required] |
Product ids. |
| quantity |
Integer [Required] |
Count of ordered products. |
RESPONSE SAMPLES PARAMETERS
| Field |
Type |
Description |
| message |
String |
Return success message. |
| status |
Integer |
Return success code. |
| status(errorResponse) |
Integer |
Return error code. |
| message(errorResponse) |
String |
Return error message. |
get order history
Url:https://api.lunatel.co/v1/OrderHistory/getOrderHistory
REQUEST SAMPLES
{
"count": 0,
"page": 0
}
RESPONSE SAMPLES
{
"status": 0,
"totalCount": 0,
"orders": [
{
"orderNo": 0,
"orderDate": "2023-10-12T21:31:13.274Z",
"address": {
"title": "string",
"address": "string",
"invoiceAddress": "string",
"companyName": "string",
"phone": "string"
},
"billingInformation": {
"title": "string",
"address": "string",
"companyName": "string",
"phone": "string"
},
"paymentInformation": {
"productsAmount": 0,
"cargoAmount": 0,
"totalAmount": 0,
"paymentType": "string"
},
"orderItems": [
{
"productId": 0,
"quantity": 0,
"unitName": "string",
"productName": "string",
"unitPrice": 0,
"totalPrice": 0
}
]
}
],
"errorResponse": {
"status": 0,
"message": "string"
}
}
REQUEST SAMPLES PARAMETERS
| Field |
Type |
Description |
| count |
Integer |
Number of rows to return. |
| page |
Integer |
Page number. |
RESPONSE SAMPLES PARAMETERS
| Field |
Type |
Description |
| totalCount |
Integer |
Total number of data. |
| orderNo |
Integer |
Your orders id. |
| orderDate |
Datetime |
Your order date. |
| title |
String |
Address title. |
| address |
String |
Detailed address description. |
| invoiceAddress |
String |
invoice address. |
| companyName |
String |
Company name. |
| phone |
String |
Phone number. |
| productsAmount |
Float |
Products amount for order. |
| cargoAmount |
Float |
Cargo amount for order. |
| totalAmount |
Float |
Total amount for order. |
| paymentType |
String |
paymentType for order. |
| productId |
Integer |
Product id for item. |
| quantity |
Float |
Quantity for item. |
| unitName |
String |
Unit Name for item. |
| productName |
String |
Product name for item. |
| unitPrice |
Float |
Unit price for item. |
| totalPrice |
Float |
Total Price for item. |
| status |
Integer |
Return success code. |
| status(errorResponse) |
Integer |
Return error code. |
| message(errorResponse) |
String |
Return error message. |
Errors
The Lunatel API uses the following error codes:
| Error Code |
Meaning |
| 400 |
Bad Request.
|
| 401 |
Unauthorized.
|
| 403 |
Forbidden.
|
| 404 |
Not Found.
|
| 422 |
Unprocessable Entity.
|