Skip to content

Instantly share code, notes, and snippets.

@hieutran
Created August 10, 2018 11:10
Show Gist options
  • Save hieutran/fc4a6a14964d464ad05f1f90dbebfa56 to your computer and use it in GitHub Desktop.
Save hieutran/fc4a6a14964d464ad05f1f90dbebfa56 to your computer and use it in GitHub Desktop.
swagger: '2.0'
info:
version: "0.0.1"
title: seudo api
description: |
Seudo API.
host:
people.apigee.io
schemes:
- https
paths:
/{service_code}/buyers/{buyer_id}/recent_orders:
get:
description: |
Gets recent `Order` objects of a `Buyer`.
parameters:
- name: service_code
in: path
description: service code
required: true
type: string
- name: buyer_id
in: path
description: id of the buyer
required: true
type: string
responses:
200:
description: Successful response
schema:
type: array
items:
$ref: '#/definitions/Order'
/{service_code}/orders/{order_id}:
get:
description: |
Gets `Order` object by `order_id`.
parameters:
- name: service_code
in: path
description: service code
required: true
type: string
- name: order_id
in: path
description: id of the order
required: true
type: string
responses:
200:
description: Successful response
schema:
$ref: '#/definitions/Order'
definitions:
Order:
required:
- "order_service_id"
- "order_code"
- "service_id"
- "service_name"
- "avatar"
- "status"
- "gobiz_status"
- "total_amount"
- "order_amount"
- "real_order_amount"
- "service_fee"
- "currency_From"
- "currency_to"
- " exchange"
- "customer_address"
- "is_deleted"
- "customer_level"
- "properties"
- "features"
- "seller"
- "id"
- "currency_process"
- "customer_addressId"
- "customer_id"
- "seller_id"
- "fees"
- "refund_by_order"
- "debit_amount"
- "created_by"
- "modified_by"
- "created_service"
- "modified_service"
- "created_at"
- "modified_at"
- "real_payment_amount"
- "customer_integration_id"
- "order_items"
properties:
order_service_id:
type: "string"
example: "767147"
order_code:
type: "string"
example: "BA6895_51281"
service_id:
type: "number"
example: 2
service_name:
type: "string"
example: "seudo"
avatar:
type: "string"
example: "//img.alicdn.com/bao/uploaded/i4/1647006872/TB2ptuRjpXXXXXxXpXXXXXXXXXX_!!1647006872.jpg_150x150q90.jpg"
status:
type: "string"
example: "BUYING "
gobiz_status:
type: "string"
example: "BUYING"
total_amount:
type: "number"
example: 1844640
order_amount:
type: "number"
example: 63540
real_order_amount:
type: "number"
example: 63540
service_fee:
type: "number"
example: 1781100
currency_From:
type: "string"
example: "CNY"
currency_to:
type: "string"
example: "VND"
exchange:
type: "number"
example: 3530
customer_address:
required:
- "type"
- "id_service"
- "is_default"
- "contact_name"
- "contact_phone"
- "district_name"
- "province_name"
- "street_address"
properties:
type:
type: "number"
example: 1
id_service:
type: "number"
example: 17393
is_default:
type: "number"
example: 0
contact_name:
type: "string"
example: "Yến Trần"
contact_phone:
type: "string"
example: "0123456789"
district_name:
type: "string"
example: "Quận Tây Hồ"
province_name:
type: "string"
example: "Hà Nội"
street_address:
type: "string"
example: "Địa chỉ test 4"
type: "object"
is_deleted:
type: "number"
example: 0
customer_level:
required:
- "level"
- "id_service"
- "level_name"
properties:
level:
type: "string"
example: "0"
id_service:
type: "number"
example: 1
level_name:
type: "string"
example: "Vip 0"
type: "object"
properties:
required:
- "type"
- "alipay"
- "buyerId"
- "freeShip"
- "lostTime"
- "sellerId"
- "checkerId"
- "netWeight"
- "tellersId"
- "userScore"
- "boughtTime"
- "buyingTime"
- "expireTime"
- "realAmount"
- "sellerInfo"
- "checkedTime"
- "createdTime"
- "debitAmount"
- "depositTime"
- "freightBill"
- "fromPartner"
- "isWarehouse"
- "paidStaffId"
- "partnerCode"
- "paymentlink"
- "boughtAmount"
- "checkingTime"
- "depositRatio"
- "isBuyingTime"
- "modifiedTime"
- "receivedTime"
- "refundAmount"
- "warningScore"
- "cancelledTime"
- "complaintTime"
- "deliveredTime"
- "depositAmount"
- "nextWarehouse"
- "orderQuantity"
- "packingWeight"
- "paymentWeight"
- "promotionCode"
- "realSurcharge"
- "refundByOrder"
- "sellerAliwang"
- "totalLinkItem"
- "addressChinaId"
- "complainSeller"
- "hasFreightBill"
- "negotiatedTime"
- "outOfTtockTime"
- "productGroupId"
- "reciveQuantity"
- "userAddressOld"
- "consignmentNote"
- "convertedWeight"
- "customerConfirm"
- "deliveryStaffId"
- "negotiatingTime"
- "pendingQuantity"
- "transportStatus"
- "transportVnType"
- "warehouseInTime"
- "warehouseStatus"
- "currentWarehouse"
- "lastChangeStatus"
- "packagesQuantity"
- "realRefundAmount"
- "receiveWarehouse"
- "serviceComplaint"
- "transportingTime"
- "warehouseOutTime"
- "isCheckingByTotal"
- "realServiceAmount"
- "refundByComplaint"
- "confirmCreatedTime"
- "depositRatioOrigin"
- "realPaymentListFee"
- "refundOrderListFee"
- "confirmApprovalTime"
- "confirmDeliveryTime"
- "directFillAmountCny"
- "directFillAmountVnd"
- "domesticShippingFee"
- "flagConfirmCustomer"
- "haravanLastSyncTime"
- "nameRecipientOrigin"
- "noteCustomerConfirm"
- "realPaymentLastTime"
- "sellerDeliveredTime"
- "tellersAssignedTime"
- "transportedStraight"
- "waitingDeliveryTime"
- "alipayCnyRefundTotal"
- "currentWarehouseTime"
- "destinationWarehouse"
- "isPrivateWoodCrating"
- "temporaryTotalAmount"
- "accountPurchaseOrigin"
- "paidStaffAssignedTime"
- "domesticShippingFeeVnd"
- "receivedFromSellerTime"
- "approvedTransportStraight"
- "complainSellerHasStatusProcessing"
properties:
type:
type: "number"
example: 0
buyerId:
type: "number"
example: 15372
freeShip:
type: "number"
example: 0
sellerId:
type: "string"
example: "683729340"
checkerId:
type: "number"
example: 0
netWeight:
type: "number"
example: 0
tellersId:
type: "number"
example: 0
userScore:
type: "number"
example: 1103.98
realAmount:
type: "number"
example: 1549670
sellerInfo:
type: "string"
example: "淘小三s"
createdTime:
type: "number"
example: 1521735029000
debitAmount:
type: "number"
example: -500147
depositTime:
type: "number"
example: 1521735029000
freightBill:
type: "string"
example: ""
isWarehouse:
type: "string"
example: ""
paidStaffId:
type: "number"
example: 0
boughtAmount:
type: "number"
example: 0
depositRatio:
type: "number"
example: 0.7
modifiedTime:
type: "number"
example: 1521735029000
refundAmount:
type: "number"
example: 0
depositAmount:
type: "number"
example: 1084769
orderQuantity:
type: "number"
example: 1
packingWeight:
type: "number"
example: 0
paymentWeight:
type: "number"
example: 0
promotionCode:
type: "string"
example: ""
refundByOrder:
type: "number"
example: 0
sellerAliwang:
type: "string"
example: "淘小三s"
totalLinkItem:
type: "number"
example: 1
addressChinaId:
type: "number"
example: 0
complainSeller:
type: "number"
example: 0
hasFreightBill:
type: "number"
example: 0
productGroupId:
type: "number"
example: 0
reciveQuantity:
type: "number"
example: 1
userAddressOld:
type: "number"
example: 0
consignmentNote:
type: "string"
example: ""
convertedWeight:
type: "number"
example: 0
customerConfirm:
type: "string"
example: "NONE"
deliveryStaffId:
type: "number"
example: 0
pendingQuantity:
type: "number"
example: 1
transportVnType:
type: "string"
example: ""
lastChangeStatus:
type: "number"
example: 1521735029000
packagesQuantity:
type: "number"
example: 0
realRefundAmount:
type: "number"
example: 0
receiveWarehouse:
type: "string"
example: ""
serviceComplaint:
type: "number"
example: 0
isCheckingByTotal:
type: "number"
example: 0
realServiceAmount:
type: "number"
example: 35246
refundByComplaint:
type: "number"
example: 0
realPaymentListFee:
type: "string"
example: "{\"ORIGINAL_PRICE\":1084769}"
refundOrderListFee:
type: "string"
example: ""
domesticShippingFee:
type: "number"
example: 0
flagConfirmCustomer:
type: "number"
example: 0
nameRecipientOrigin:
type: "string"
example: ""
realPaymentLastTime:
type: "number"
example: 1521735029000
transportedStraight:
type: "number"
example: 0
alipayCnyRefundTotal:
type: "number"
example: -1
destinationWarehouse:
type: "string"
example: "G-HN"
isPrivateWoodCrating:
type: "number"
example: 0
temporaryTotalAmount:
type: "number"
example: 1584916
domesticShippingFeeVnd:
type: "number"
example: 0
complainSellerHasStatusProcessing:
type: "number"
example: 0
type: "object"
features:
type: "array"
items:
type: "object"
properties:
group_code:
type: "string"
example: ""
group_name:
type: "string"
example: ""
feature_code:
type: "string"
example: "CHECKING"
feature_name:
type: "string"
example: "Kiểm hàng"
seller:
required:
- "seller_id"
- "seller_name"
- "seller_source"
properties:
seller_id:
type: "string"
example: "1647006872"
seller_name:
type: "string"
example: "小货郎家居专营店"
seller_source:
type: "string"
example: "tmall"
type: "object"
id:
type: "number"
example: 9257
currency_process:
required:
- "created"
- "description"
properties:
created:
type: "number"
example: 0
type: "object"
customer_addressId:
type: "number"
example: 0
customer_id:
type: "number"
example: 48
seller_id:
type: "string"
example: ""
fees:
type: "array"
items:
type: "object"
properties:
code:
type: "string"
example: "CHECKING"
name:
type: "string"
example: "Kiểm hàng"
amount:
type: "number"
example: 7000
currency:
type: "string"
example: "VND"
rawAmount:
type: "number"
example: 7000
refund_by_order:
type: "number"
example: 0
debit_amount:
type: "number"
example: 0
created_by:
type: "number"
example: 5
modified_by:
type: "number"
example: 5
created_service:
type: "string"
example: "2018-03-28 08:59:17+00"
modified_service:
type: "string"
example: "2018-04-06 14:02:32+00"
created_at:
type: "string"
example: "2018-05-03 04:55:35.645+00"
modified_at:
type: "string"
example: "2018-05-03 04:55:35.645+00"
real_payment_amount:
type: "number"
example: 1844640
customer_integration_id:
type: "number"
example: 46
order_items:
type: "array"
items:
type: "object"
properties:
origin_id:
type: "string"
example: "522686804765"
order_id:
type: "number"
example: 8644
name:
type: "string"
example: "YT鞋子收纳袋旅行装鞋袋防水鞋包防尘袋装鞋子鞋套旅游收纳包"
main_image:
type: "array"
items:
type: "string"
example:
- "//img.alicdn.com/bao/uploaded/i2/2149663944/TB2ZkXwhpXXXXbKXXXXXXXXXXXX_!!2149663944.jpg_150x150q90.jpg"
origin_url:
type: "string"
example: "https://detail.tmall.com/item.htm?spm=a230r.1.14.6.6c6849dfOhVZQ9&id=522686804765&cm_id=140105335569ed55e27b&abbucket=9&skuId=3120348732053"
varian_image:
type: "string"
example: "//img.alicdn.com/bao/uploaded/i2/2149663944/TB2ZkXwhpXXXXbKXXXXXXXXXXXX_!!2149663944.jpg_150x150q90.jpg"
quantity:
type: "number"
example: 1
quantity_bought:
type: "number"
example: 1
quantity_receive:
type: "number"
example: 1
origin_price:
type: "number"
example: 9.9
sale_price:
type: "number"
example: 9.9
origin_currency:
type: "string"
example: "CNY"
properties:
required:
- "link"
- "step"
- "tool"
- "brand"
- "price"
- "source"
- "weight"
- "comment"
- "is_paied"
- "outer_id"
- "property"
- "haravan_id"
- "is_received"
- "modify_time"
- "note_system"
- "require_min"
- "created_time"
- "haravan_shop"
- "title_origin"
- "location_sale"
- "error_ordering"
- "property_value"
- "category_custom"
- "comment_private"
- "price_promotion"
- "haravan_last_sync"
- "staff_edited_price"
- "property_translated"
- "staff_edited_priceTime"
- "haravan_last_sync_result"
properties:
link:
type: "string"
example: "https://detail.tmall.com/item.htm?spm=a230r.1.14.6.6c6849dfOhVZQ9&id=522686804765&cm_id=140105335569ed55e27b&abbucket=9&skuId=3120348732053"
step:
type: "number"
example: 1
tool:
type: "string"
example: "Addon 4.11.82"
brand:
type: "string"
example: ""
price:
type: "number"
example: 34947
source:
type: "string"
example: "TMALL"
weight:
type: "number"
example: 0
outer_id:
type: "string"
example: "30156"
property:
type: "string"
example: "A款 果绿;"
haravan_id:
type: "string"
example: ""
is_received:
type: "number"
example: 0
require_min:
type: "number"
example: 1
created_time:
type: "number"
example: 1520952999000
haravan_shop:
type: "string"
example: ""
title_origin:
type: "string"
example: "YT鞋子收纳袋旅行装鞋袋防水鞋包防尘袋装鞋子鞋套旅游收纳包"
location_sale:
type: "string"
example: ""
error_ordering:
type: "number"
example: 0
property_value:
type: "string"
example: "1627207:30156"
category_custom:
type: "string"
example: ""
comment_private:
type: "string"
example: ""
price_promotion:
type: "number"
example: 9.9
staff_edited_price:
type: "number"
example: 0
property_translated:
type: "string"
example: "A款 果绿;"
haravan_last_sync_result:
type: "number"
example: 0
type: "object"
product_group:
type: "number"
example: 6
note:
type: "string"
example: ""
min_quantity:
type: "number"
example: 1
batch_size:
type: "string"
example: ""
price_tables:
type: "array"
items:
type: "object"
example: []
stock integer:
type: "number"
example: 12
seller:
required:
- "id"
- "name"
- "origin_url"
- "sellerAliwang"
- "seller_homeland"
properties:
id:
type: "string"
example: "2149663944"
name:
type: "string"
example: "youngtime旗舰店"
sellerAliwang:
type: "string"
example: "youngtime旗舰店"
seller_homeland:
type: "string"
example: "tmall"
type: "object"
id:
type: "number"
example: 3955
modified_by:
type: "number"
example: 5
created_by:
type: "number"
example: 5
orderItem_service_id:
type: "number"
example: 2201530
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment