SAP电商云CCV2 Restful API enablement-阿里云开发者社区

开发者社区> -开发者助手-> 正文

SAP电商云CCV2 Restful API enablement

简介: SAP电商云CCV2 Restful API enablement
+关注继续查看

image.png

{
    "info": {
        "_postman_id": "6b7f9822-6ca0-4c24-a14f-d00a7e8b73b0",
        "name": "Reg-PlaceOrder",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "item": [
        {
            "name": "1. auth - client_customer",
            "request": {
                "method": "POST",
                "header": [],
                "url": {
                    "raw": "https://{{host}}:9002/authorizationserver/oauth/token?client_id=mobile_android&client_secret=secret&grant_type=password&username={{user}}&password={{password}}",
                    "protocol": "https",
                    "host": [
                        "{{host}}"
                    ],
                    "port": "9002",
                    "path": [
                        "authorizationserver",
                        "oauth",
                        "token"
                    ],
                    "query": [
                        {
                            "key": "client_id",
                            "value": "mobile_android"
                        },
                        {
                            "key": "client_secret",
                            "value": "secret"
                        },
                        {
                            "key": "grant_type",
                            "value": "password"
                        },
                        {
                            "key": "username",
                            "value": "{{user}}"
                        },
                        {
                            "key": "password",
                            "value": "{{password}}"
                        }
                    ]
                }
            },
            "response": []
        },
        {
            "name": "2. CreateCart",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Authorization",
                        "value": "{{trust_credential}}",
                        "description": "trust_credential",
                        "type": "text",
                        "disabled": true
                    },
                    {
                        "key": "Authorization",
                        "value": "{{client_credential}}",
                        "description": "client_credential",
                        "type": "text",
                        "disabled": true
                    },
                    {
                        "key": "Authorization",
                        "value": "{{client_customer}}",
                        "description": "client_customer",
                        "type": "text"
                    },
                    {
                        "key": "Authorization",
                        "value": "{{client_manager}}",
                        "description": "client_manager",
                        "type": "text",
                        "disabled": true
                    },
                    {
                        "key": "",
                        "value": "",
                        "type": "text",
                        "disabled": true
                    }
                ],
                "url": {
                    "raw": "https://{{host}}:9002/rest/v2/electronics/users/{{user}}/carts",
                    "protocol": "https",
                    "host": [
                        "{{host}}"
                    ],
                    "port": "9002",
                    "path": [
                        "rest",
                        "v2",
                        "electronics",
                        "users",
                        "{{user}}",
                        "carts"
                    ]
                }
            },
            "response": []
        },
        {
            "name": "3. addProduct",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Content-Type",
                        "name": "Content-Type",
                        "value": "application/json",
                        "type": "text"
                    },
                    {
                        "key": "Content-Type",
                        "name": "Content-Type",
                        "value": "application/json",
                        "type": "text",
                        "disabled": true
                    },
                    {
                        "key": "Authorization",
                        "value": "{{trust_credential}}",
                        "description": "trust_credential",
                        "type": "text",
                        "disabled": true
                    },
                    {
                        "key": "Authorization",
                        "value": "{{client_credential}}",
                        "description": "client_credential",
                        "type": "text",
                        "disabled": true
                    },
                    {
                        "key": "Authorization",
                        "value": "{{client_customer}}",
                        "description": "client_customer",
                        "type": "text"
                    },
                    {
                        "key": "Authorization",
                        "value": "{{client_manager}}",
                        "description": "client_manager",
                        "type": "text",
                        "disabled": true
                    }
                ],
                "body": {
                    "mode": "raw",
                    "raw": "{\n\t\"product\": {\n\t\t\"code\": \"779866\",\n\t\t\"quantity\": 1\n\t}\n}"
                },
                "url": {
                    "raw": "https://{{host}}:9002/rest/v2/electronics/users/{{user}}/carts/{{cartguid}}/entries",
                    "protocol": "https",
                    "host": [
                        "{{host}}"
                    ],
                    "port": "9002",
                    "path": [
                        "rest",
                        "v2",
                        "electronics",
                        "users",
                        "{{user}}",
                        "carts",
                        "{{cartguid}}",
                        "entries"
                    ]
                }
            },
            "response": []
        },
        {
            "name": "4. CreateAddress",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Content-Type",
                        "name": "Content-Type",
                        "value": "application/json",
                        "type": "text"
                    },
                    {
                        "key": "Authorization",
                        "value": "{{trust_credential}}",
                        "description": "trust_credential",
                        "type": "text",
                        "disabled": true
                    },
                    {
                        "key": "Authorization",
                        "value": "{{client_credential}}",
                        "description": "client_credential",
                        "type": "text",
                        "disabled": true
                    },
                    {
                        "key": "Authorization",
                        "value": "{{client_customer}}",
                        "description": "client_customer",
                        "type": "text"
                    },
                    {
                        "key": "Authorization",
                        "value": "{{client_manager}}",
                        "description": "client_manager",
                        "type": "text",
                        "disabled": true
                    },
                    {
                        "key": "",
                        "value": "",
                        "type": "text",
                        "disabled": true
                    }
                ],
                "body": {
                    "mode": "raw",
                    "raw": "{\n   \"country\": {\n      \"isocode\": \"AD\"\n   },\n   \"defaultAddress\": true,\n   \"firstName\": \"terry\",\n   \"id\": \"8796552134679\",\n   \"lastName\": \"tan\",\n   \"line1\": \"tianfu\",\n   \"line2\": \"sdas\",\n   \"postalCode\": \"610000\",\n   \"titleCode\": \"mr\",\n   \"town\": \"city\"\n}\n\n\n"
                },
                "url": {
                    "raw": "https://{{host}}:9002/rest/v2/electronics/users/{{user}}/carts/{{cartguid}}/addresses/delivery",
                    "protocol": "https",
                    "host": [
                        "{{host}}"
                    ],
                    "port": "9002",
                    "path": [
                        "rest",
                        "v2",
                        "electronics",
                        "users",
                        "{{user}}",
                        "carts",
                        "{{cartguid}}",
                        "addresses",
                        "delivery"
                    ]
                }
            },
            "response": []
        },
        {
            "name": "5. deliveryMode",
            "request": {
                "method": "PUT",
                "header": [
                    {
                        "key": "Content-Type",
                        "name": "Content-Type",
                        "value": "application/json",
                        "type": "text",
                        "disabled": true
                    },
                    {
                        "key": "Authorization",
                        "value": "{{trust_credential}}",
                        "description": "trust_credential",
                        "type": "text",
                        "disabled": true
                    },
                    {
                        "key": "Authorization",
                        "value": "{{client_credential}}",
                        "description": "client_credential",
                        "type": "text",
                        "disabled": true
                    },
                    {
                        "key": "Authorization",
                        "value": "{{client_customer}}",
                        "description": "client_customer",
                        "type": "text"
                    },
                    {
                        "key": "Authorization",
                        "value": "{{client_manager}}",
                        "description": "client_manager",
                        "type": "text",
                        "disabled": true
                    }
                ],
                "body": {
                    "mode": "raw",
                    "raw": ""
                },
                "url": {
                    "raw": "https://{{host}}:9002/rest/v2/electronics/users/{{user}}/carts/{{cartguid}}/deliverymode?deliveryModeId=standard-gross",
                    "protocol": "https",
                    "host": [
                        "{{host}}"
                    ],
                    "port": "9002",
                    "path": [
                        "rest",
                        "v2",
                        "electronics",
                        "users",
                        "{{user}}",
                        "carts",
                        "{{cartguid}}",
                        "deliverymode"
                    ],
                    "query": [
                        {
                            "key": "deliveryModeId",
                            "value": "standard-gross"
                        }
                    ]
                }
            },
            "response": []
        },
        {
            "name": "6. accPaymentDetail",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Authorization",
                        "value": "{{trust_credential}}",
                        "description": "trust_credential",
                        "type": "text",
                        "disabled": true
                    },
                    {
                        "key": "Authorization",
                        "value": "{{client_credential}}",
                        "description": "client_credential",
                        "type": "text",
                        "disabled": true
                    },
                    {
                        "key": "Authorization",
                        "value": "{{client_customer}}",
                        "description": "client_customer",
                        "type": "text"
                    },
                    {
                        "key": "Authorization",
                        "value": "{{client_manager}}",
                        "description": "client_manager",
                        "type": "text",
                        "disabled": true
                    },
                    {
                        "key": "Content-Type",
                        "name": "Content-Type",
                        "value": "application/json",
                        "type": "text"
                    }
                ],
                "body": {
                    "mode": "raw",
                    "raw": "{\n  \"accountHolderName\": \"kate\",\n  \"billingAddress\": {\n    \"cellphone\": \"13444444444\",\n    \"companyName\": \"company\",\n    \"country\": {\n      \"isocode\": \"CN\",\n      \"name\": \"string\"\n    },\n    \"defaultAddress\": true,\n    \"district\": \"CN-12-1-1\",\n    \"email\": \"k.zheng@sap.com\",\n    \"firstName\": \"string\",\n    \"formattedAddress\": \"string\",\n    \"lastName\": \"string\",\n    \"line1\": \"string\",\n    \"line2\": \"string\",\n    \"phone\": \"12333333333\",\n    \"postalCode\": \"string\",\n    \"region\": {\n      \"countryIso\": \"CN\",\n      \"isocode\": \"CN-12\",\n      \"isocodeShort\": \"string\",\n      \"name\": \"string\"\n    },\n    \"shippingAddress\": true,\n    \"title\": \"string\",\n    \"titleCode\": \"mrs\",\n    \"town\": \"CN-12-1\",\n    \"visibleInAddressBook\": true\n  },\n  \"cardNumber\": \"1234567890987654\",\n  \"cardType\": {\n    \"code\": \"visa\",\n    \"name\": \"string\"\n  },\n  \"defaultPayment\": true,\n  \"expiryMonth\": \"12\",\n  \"expiryYear\": \"2022\"\n}"
                },
                "url": {
                    "raw": "https://{{host}}:9002/rest/v2/electronics/users/{{user}}/carts/{{cartguid}}/paymentdetails",
                    "protocol": "https",
                    "host": [
                        "{{host}}"
                    ],
                    "port": "9002",
                    "path": [
                        "rest",
                        "v2",
                        "electronics",
                        "users",
                        "{{user}}",
                        "carts",
                        "{{cartguid}}",
                        "paymentdetails"
                    ]
                }
            },
            "response": []
        },
        {
            "name": "7. accPlaceOrder",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Authorization",
                        "value": "{{trust_credential}}",
                        "description": "trust_credential",
                        "type": "text",
                        "disabled": true
                    },
                    {
                        "key": "Authorization",
                        "value": "{{client_credential}}",
                        "description": "client_credential",
                        "type": "text",
                        "disabled": true
                    },
                    {
                        "key": "Authorization",
                        "value": "{{client_customer}}",
                        "description": "client_customer",
                        "type": "text"
                    },
                    {
                        "key": "Authorization",
                        "value": "{{client_manager}}",
                        "description": "client_manager",
                        "type": "text",
                        "disabled": true
                    }
                ],
                "url": {
                    "raw": "https://{{host}}:9002/rest/v2/electronics/users/{{user}}/orders?cartId={{cartguid}}&lang=en",
                    "protocol": "https",
                    "host": [
                        "{{host}}"
                    ],
                    "port": "9002",
                    "path": [
                        "rest",
                        "v2",
                        "electronics",
                        "users",
                        "{{user}}",
                        "orders"
                    ],
                    "query": [
                        {
                            "key": "cartId",
                            "value": "{{cartguid}}"
                        },
                        {
                            "key": "lang",
                            "value": "en"
                        }
                    ]
                }
            },
            "response": []
        },
        {
            "name": "8. getOrder",
            "request": {
                "method": "GET",
                "header": [
                    {
                        "key": "Content-Type",
                        "name": "Content-Type",
                        "value": "application/json",
                        "type": "text",
                        "disabled": true
                    },
                    {
                        "key": "Authorization",
                        "value": "{{trust_credential}}",
                        "description": "trust_credential",
                        "type": "text",
                        "disabled": true
                    },
                    {
                        "key": "Authorization",
                        "value": "{{client_credential}}",
                        "description": "client_credential",
                        "type": "text",
                        "disabled": true
                    },
                    {
                        "key": "Authorization",
                        "value": "{{client_customer}}",
                        "description": "client_customer",
                        "type": "text"
                    },
                    {
                        "key": "Authorization",
                        "value": "{{client_manager}}",
                        "description": "client_manager",
                        "type": "text",
                        "disabled": true
                    }
                ],
                "url": {
                    "raw": "https://{{host}}:9002/rest/v2/electronics/users/{{user}}/orders/00001003",
                    "protocol": "https",
                    "host": [
                        "{{host}}"
                    ],
                    "port": "9002",
                    "path": [
                        "rest",
                        "v2",
                        "electronics",
                        "users",
                        "{{user}}",
                        "orders",
                        "00001003"
                    ]
                }
            },
            "response": []
        }
    ],
    "protocolProfileBehavior": {}
}

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
阿里云服务器怎么设置密码?怎么停机?怎么重启服务器?
如果在创建实例时没有设置密码,或者密码丢失,您可以在控制台上重新设置实例的登录密码。本文仅描述如何在 ECS 管理控制台上修改实例登录密码。
9473 0
使用NAT网关轻松为单台云服务器设置多个公网IP
在应用中,有时会遇到用户询问如何使单台云服务器具备多个公网IP的问题。 具体如何操作呢,有了NAT网关这个也不是难题。
26724 0
阿里云服务器如何登录?阿里云服务器的三种登录方法
购买阿里云ECS云服务器后如何登录?场景不同,大概有三种登录方式:
2920 0
阿里云服务器端口号设置
阿里云服务器初级使用者可能面临的问题之一. 使用tomcat或者其他服务器软件设置端口号后,比如 一些不是默认的, mysql的 3306, mssql的1433,有时候打不开网页, 原因是没有在ecs安全组去设置这个端口号. 解决: 点击ecs下网络和安全下的安全组 在弹出的安全组中,如果没有就新建安全组,然后点击配置规则 最后如上图点击添加...或快速创建.   have fun!  将编程看作是一门艺术,而不单单是个技术。
10839 0
windows server 2008阿里云ECS服务器安全设置
最近我们Sinesafe安全公司在为客户使用阿里云ecs服务器做安全的过程中,发现服务器基础安全性都没有做。为了为站长们提供更加有效的安全基础解决方案,我们Sinesafe将对阿里云服务器win2008 系统进行基础安全部署实战过程! 比较重要的几部分 1.
9045 0
阿里云服务器如何登录?阿里云服务器的三种登录方法
购买阿里云ECS云服务器后如何登录?场景不同,云吞铺子总结大概有三种登录方式: 登录到ECS云服务器控制台 在ECS云服务器控制台用户可以更改密码、更换系统盘、创建快照、配置安全组等操作如何登录ECS云服务器控制台? 1、先登录到阿里云ECS服务器控制台 2、点击顶部的“控制台” 3、通过左侧栏,切换到“云服务器ECS”即可,如下图所示 通过ECS控制台的远程连接来登录到云服务器 阿里云ECS云服务器自带远程连接功能,使用该功能可以登录到云服务器,简单且方便,如下图:点击“远程连接”,第一次连接会自动生成6位数字密码,输入密码即可登录到云服务器上。
21882 0
阿里云服务器ECS登录用户名是什么?系统不同默认账号也不同
阿里云服务器Windows系统默认用户名administrator,Linux镜像服务器用户名root
4002 0
2450
文章
0
问答
来源圈子
更多
+ 订阅
文章排行榜
最热
最新
相关电子书
更多
《2021云上架构与运维峰会演讲合集》
立即下载
《零基础CSS入门教程》
立即下载
《零基础HTML入门教程》
立即下载