货运方式
接口描述
URL | index.php?route=checkout/shipping_method/api |
功能描述 | 获取货运方式 |
返回格式 | Json,UTF8 |
HTTP请求方式 | GET |
返回参数
参数名 | 参数全称 | 必选 | 参数类型 | 参数描述 |
---|
code | code | true | String | 代码 |
title | title | true | String | 标题 |
cost | cost | true | String | 费用 |
tax_class_id | tax_class_id | true | Int | 税 ID |
text | text | true | String | 价格文本 |
调用示例
index.php?route=checkout/shipping_method/api
响应示例
{
"shipping_methods":{
"flat":{
"title":"一般运费",
"quote":{
"flat":{
"code":"flat.flat",
"title":"一般运费",
"cost":"50.00",
"tax_class_id":"0",
"text":"HK $50.00"
}
},
"sort_order":"1",
"error":false
},
"free":{
"title":"自提点取货",
"quote":{
"free":{
"code":"free.free",
"title":"自提点取货",
"cost":0,
"tax_class_id":0,
"text":"HK $0.00"
}
},
"sort_order":"2",
"error":false
},
"pickup":{
"title":"到店自取",
"quote":{
"pickup":{
"code":"pickup.pickup",
"title":"到本商店自取",
"cost":0,
"tax_class_id":0,
"text":"HK $0.00"
}
},
"sort_order":"3",
"error":false
}
},
"code":"flat.flat"
}
支付方式
接口描述
URL | index.php?route=checkout/payment_method/api |
功能描述 | 获取支付方式 |
返回格式 | Json,UTF8 |
HTTP请求方式 | GET |
返回参数
参数名 | 参数全称 | 必选 | 参数类型 | 参数描述 |
---|
code | code | true | String | 代码 |
title | title | true | String | 标题 |
调用示例
index.php?route=checkout/payment_method/api
响应示例
{
"text_agree":"我已经阅读并同意 免责声明 条款",
"payment_methods":{
"bank_transfer":{
"code":"bank_transfer",
"title":"银行转帐",
"terms":"",
"sort_order":""
},
"pp_express":{
"code":"pp_express",
"title":"PayPal快速结账",
"terms":"",
"sort_order":""
}
}
}
结账
接口描述
URL | index.php?route=checkout/checkout/api |
功能描述 | 结账 |
返回格式 | Json,UTF8 |
HTTP请求方式 | POST |
业务参数
参数名 | 参数全称 | 必选 | 参数类型 | 参数描述 |
---|
shipping_method | shipping_method | true | String | 货运方式 值为:code代码 |
payment_method | payment_method | true | String | 支付方式 值为:code代码 |
返回参数
参数名 | 参数全称 | 必选 | 参数类型 | 参数描述 |
---|
logged | logged | true | Int | 是否已登录,登录了为用户ID |
account | account | true | String | 帐号类型 guest register |
shipping_required | shipping_required | true | Bool | 是否需要运送 |
调用示例
index.php?route=checkout/checkout/api
响应示例
{
"logged":null,
"account":"guest",
"shipping_required":true
}
结账登录
接口描述
URL | index.php?route=checkout/login/saveapi |
功能描述 | 结账登录 |
返回格式 | Json,UTF8 |
HTTP请求方式 | POST |
业务参数
参数名 | 参数全称 | 必选 | 参数类型 | 参数描述 |
---|
email | email | true | String | 邮箱地址 |
password | password | true | String | 密码 |
调用示例
index.php?route=checkout/login/saveapi
响应示例
{
"success": "success"
}
运送资料
接口描述
URL | index.php?route=checkout/guest/api |
功能描述 | 订单运送资料 |
返回格式 | Json,UTF8 |
HTTP请求方式 | POST |
业务参数
参数名 | 参数全称 | 必选 | 参数类型 | 参数描述 |
---|
firstname | firstname | true | String | 收货人名称 |
telephone | telephone | true | String | 联络电话 |
email | email | true | String | 电邮 |
address_1 | address_1 | true | String | 收货地址 |
comment | comment | false | String | 其他内容 |
返回参数
参数名 | 参数全称 | 必选 | 参数类型 | 参数描述 |
---|
firstname | firstname | true | String | 收货人名称 |
telephone | telephone | true | String | 联络电话 |
email | email | true | String | 电邮 |
address_1 | address_1 | true | String | 收货地址 |
comment | comment | false | String | 其他内容 |
调用示例
index.php?route=checkout/guest/api
响应示例
{
"customer_groups":[
{
"customer_group_id":"1",
"approval":"0",
"sort_order":"1",
"language_id":"3",
"name":"Default",
"description":"test"
}
],
"customer_group_id":"1",
"firstname":"收货人名称",
"lastname":"",
"email":"电邮",
"telephone":"联络电话",
"address_1":"收货地址",
"comment":"其他内容"
}
{
"success": "success"
}
结账注册
接口描述
URL | index.php?route=checkout/register/api |
功能描述 | 结账注册 |
返回格式 | Json,UTF8 |
HTTP请求方式 | POST |
业务参数
参数名 | 参数全称 | 必选 | 参数类型 | 参数描述 |
---|
firstname | firstname | true | String | 收货人名称 |
telephone | telephone | true | String | 联络电话 |
email | email | true | String | 电邮 |
address_1 | address_1 | true | String | 收货地址 |
comment | comment | false | String | 其他内容 |
password | password | true | String | 密码 |
confirm | confirm | true | String | 确认密码 |
返回参数
同上
调用示例
index.php?route=checkout/register/api
响应示例
{
"customer_groups":[
{
"customer_group_id":"1",
"approval":"0",
"sort_order":"1",
"language_id":"3",
"name":"Default",
"description":"test"
}
],
"customer_group_id":"1",
"firstname":"收货人名称",
"lastname":"",
"email":"电邮",
"telephone":"联络电话",
"address_1":"收货地址",
"comment":"其他内容"
}
{
"success": "success"
}