Skip to content

关于 订单

访问范围

需要多个访问范围—请参阅每个端点以了解访问范围要求。

需要访问受保护的客户数据。

订单管理是 Genstore 交易系统的核心组成部分,它实现了从订单创建到完成的全生命周期管理。通过标准化的订单处理流程,为商家提供高效可靠的订单管理能力,确保交易安全和业务连续性。

核心功能

  • 订单基础操作:创建订单、修改订单、取消订单、删除订单。
  • 订单状态管理:确认订单、关闭订单、重新打开订单。
  • 订单信息查询:查询订单详情、查询订单列表、统计订单数量。

应用场景

  • 全渠道订单运营:商家可统一管理各渠道订单,实现多渠道订单的集中处理和状态同步,提升订单处理效率。
  • 订单履约管理:运营团队可实时掌握订单状态、分配处理任务、跟进异常订单,确保订单及时交付和客户满意度。
  • 交易数据分析:数据分析团队可获取订单全量数据,进行交易趋势分析、客户行为洞察,为业务决策提供数据支持。
  • 客服工单协同:客服团队可快速查询订单详情、处理售后请求、记录服务过程,提供专业的客户服务体验。

接口

GET /api/202412/orders: 获取订单列表

GET /api/202412/orders/count: 获取订单数量

GET /api/202412/orders/{orderId}: 获取订单详情

订单 对象

订单业务域对象。

属性

orderobject
返回订单详细资料信息。
- 收起属性
billingAddressobject
与付款方式相关联的邮寄地址。此地址是一个可选字段,对于不需要付款方式的订单将不可用。
+ 展开属性
buyerAcceptsMarketingboolean
客户是否同意接收来自商店的电子邮件更新。
cancelReasonstring
订单被取消的原因。
cancelledAtstring
订单被取消的日期和时间。如果未取消订单,则返回 null。
closedAtstring
订单关闭的日期和时间(ISO 8601格式)。如果订单未关闭则返回 null。
createdAtstring
创建订单时自动生成的日期和时间(ISO 8601格式)。此属性的值不能更改。
currencystring
商店货币代码。
currentTotalDiscountsstring
当前以商店货币表示的订单总折扣。
currentTotalPricestring
以商店货币表示的当前订单总价。
currentSubtotalPricestring
所有行项目在折扣和退货后的价格总和,以商店货币表示。
currentTotalTaxstring
以商店货币表示的应用于订单的所有税目的价格总和,不包括已退款和已取消的税目。
customerobject
客户信息。
+ 展开属性
discountCodesarray
应用于订单的折扣列表。
+ 展开属性
emailstring
客户的电子邮件地址。
financialStatusstring
与订单相关的付款状态。
fulfillmentsarray
履约单列表。
+ 展开属性
fulfillmentStatusstring
订单履约状态。
lineItemsarray
订单项列表。
+ 展开属性
notestring
订单备注。
orderIdnumber
订单号。
paymentTermsobject
支付项列表。
+ 展开属性
paymentGatewayNamesarray
订单支付网关列表。
phonestring
客户接收短信通知的电话号码。
presentmentCurrencystring
用于向客户显示价格的显示货币。
shippingAddressobject
订单将被运送到的邮寄地址。此地址是可选的,将不可用于不需要送货的订单。
+ 展开属性
sourceNamestring
订单来源。
sourceIdentifierstring
在原始平台上的订单 ID。
subtotalPricestring
以商店货币表示的订单价格,扣除折扣后,不包括运费、关税、税金和小费。
tagsstring
附加到订单上的标记,格式为逗号分隔值的字符串。标签是额外的简短描述符,通常用于过滤和搜索。每个标签的长度限制为 40 个字符。
taxesIncludedboolean
订单小计中是否包含税金。
dutiesIncludedboolean
关税是否包含在订单小计中。
totalDiscountsstring
以商店货币表示的应用于订单价格的总折扣。
totalLineItemsPricestring
以商店货币表示的所有行项目价格的总和。
totalOutstandingstring
以商店货币计算的订单未付款总额。
totalPricestring
以商店货币表示的所有行项目价格、折扣、运费、税和小费的总和
totalTaxstring
以商店货币表示的应用于订单的所有税目的价格总和,包括已退款和已取消的税目。
totalWeightnumber
以克为单位的所有项目重量的总和。
updatedAtstring
最后一次修改订单的日期和时间。
bash
{
  "order": {
    "note": "Customer changed their mind.",
    "sourceIdentifier": "ORDERID-123",
    "totalOutstanding": "5.00",
    "currentTotalDiscounts": "10.00",
    "orderId": "1001",
    "totalPrice": "409.94",
    "totalDiscounts": "0.00",
    "paymentGatewayNames": "["authorize_net","Cash on Delivery (COD)"]",
    "currentTotalTax": "10.00",
    "fulfillmentStatus": "partial",
    "currentTotalPrice": "10.00",
    "currentSubtotalPrice": "10.00",
    "lineItems": [
      {
        "variantTitle": "Pink",
        "quantity": "1",
        "productId": "7513594",
        "taxable": "true",
        "title": "IPod Nano",
        "fulfillableQuantity": "1",
        "fulfillmentStatus": "fulfilled",
        "requiresShipping": "true",
        "price": "199.99",
        "giftCard": "false",
        "totalDiscount": "5.00",
        "id": "669751112",
        "variantId": "4264112",
        "grams": "500",
        "sku": "IPOD-342-N",
        "currentQuantity": "1"
      }
    ],
    "totalTax": "11.94",
    "createdAt": "2008-01-10T11:00:00-05:00",
    "fulfillments": [
      {
        "createdAt": "2022-01-01T11:00:00-01:00",
        "orderId": "3183479",
        "fulfillId": "255858046",
        "status": "failure",
        "updatedAt": "2022-01-01T11:00:00-01:00""
      }
    ],
    "presentmentCurrency": "CAD",
    "dutiesIncluded": "false",
    "currency": "USD",
    "cancelReason": "customer",
    "closedAt": "2008-01-10T11:00:00-05:00",
    "subtotalPrice": "398.00",
    "email": "[email protected]",
    "paymentTerms": {
      "amount": "70",
      "currency": "CAD"
    },
    "updatedAt": "2012-08-24T14:02:15-04:00",
    "taxesIncluded": "false",
    "discountCodes": [
      {
        "amount": "30.00",
        "code": "SPRING30",
        "type": "fixed_amount"
      }
    ],
    "cancelledAt": "null",
    "tags": "imported, vip",
    "buyerAcceptsMarketing": "false",
    "phone": "+557734881234",
    "totalLineItemsPrice": "398.00",
    "financialStatus": "paid",
    "totalWeight": "300",
    "shippingAddress": {
      "zip": "K2P0V6",
      "country": "Canada",
      "lastName": "Bobsen",
      "address2": "Amoebobacterieae",
      "city": "Ottawa",
      "address1": "123 Amoebobacterieae St",
      "provinceCode": "ON",
      "latitude": "45.41634",
      "firstName": "Bob",
      "province": "Ontario",
      "phone": "555-625-1199",
      "countryCode": "CA",
      "name": "Bob Bobsen",
      "longitude": "-75.6868"
    },
    "billingAddress": {
      "zip": "T0E 0M0",
      "country": "Canada",
      "lastName": "Gorski",
      "address2": "Apartment 5",
      "city": "Drayton Valley",
      "address1": "2259 Park Ct",
      "provinceCode": "AB",
      "latitude": "45.41634",
      "firstName": "Christopher",
      "province": "Alberta",
      "phone": "(555)555-5555",
      "countryCode": "CA",
      "name": "Christopher Gorski",
      "longitude": "-75.6868"
    },
    "sourceName": "instagram",
    "customer": {
      "lastName": "Norman",
      "note": "A note about the customer.",
      "addresses": "",
      "taxExempt": "true",
      "taxExemptions": "["CA_STATUS_CARD_EXEMPTION","CA_BC_RESELLER_EXEMPTION"]",
      "tags": "loyal",
      "createdAt": "2013-06-27T08:48:27-04:00",
      "firstName": "John",
      "phone": "16135551111",
      "currency": "JPY",
      "id": "207119551",
      "state": "disabled",
      "email": "[email protected]",
      "updatedAt": "2012-08-24T14:01:46-04:00",
      "verifiedEmail": "true",
      "defaultAddress": ""
    }
  }
}

GET 获取订单列表

检索满足指定条件的订单列表。

访问范围

需要以下任意访问权限: read_orders write_orders

接口

GET /api/202412/orders 

请求参数

createdAtMaxstring
显示在日期或日期之前创建的订单。
createdAtMinstring
显示在日期或日期之后创建的订单。
updatedAtMaxstring
显示订单最后更新日期或之前的日期。
updatedAtMinstring
显示订单最后更新日期或之后的日期。
financialStatusstring
按支付状态过滤订单。
fulfillmentStatusstring
按履约状态过滤订单。
idsstring
仅检索由逗号分隔的订单 id 列表指定的订单。
limitnumber
在一个页面上显示的最大结果数。

响应数据

ordersarray
返回订单详细资料信息。
- 收起属性
billingAddressobject
与付款方式相关联的邮寄地址。此地址是一个可选字段,对于不需要付款方式的订单将不可用。
+ 展开属性
buyerAcceptsMarketingboolean
客户是否同意接收来自商店的电子邮件更新。
cancelReasonstring
订单被取消的原因。
cancelledAtstring
订单被取消的日期和时间。如果未取消订单,则返回 null。
closedAtstring
订单关闭的日期和时间(ISO 8601格式)。如果订单未关闭则返回 null。
createdAtstring
创建订单时自动生成的日期和时间(ISO 8601格式)。此属性的值不能更改。
currencystring
商店货币代码。
currentTotalDiscountsstring
当前以商店货币表示的订单总折扣。
currentTotalPricestring
以商店货币表示的当前订单总价。
currentSubtotalPricestring
所有行项目在折扣和退货后的价格总和,以商店货币表示。
currentTotalTaxstring
以商店货币表示的应用于订单的所有税目的价格总和,不包括已退款和已取消的税目。
customerobject
客户信息。
+ 展开属性
discountCodesarray
应用于订单的折扣列表。
+ 展开属性
emailstring
客户的电子邮件地址。
financialStatusstring
与订单相关的付款状态。
fulfillmentsarray
履约单列表。
+ 展开属性
fulfillmentStatusstring
订单履约状态。
lineItemsarray
订单项列表。
+ 展开属性
notestring
订单备注。
orderIdnumber
订单号。
paymentTermsobject
支付项列表。
+ 展开属性
paymentGatewayNamesarray
订单支付网关列表。
phonestring
客户接收短信通知的电话号码。
presentmentCurrencystring
用于向客户显示价格的显示货币。
shippingAddressobject
订单将被运送到的邮寄地址。此地址是可选的,将不可用于不需要送货的订单。
+ 展开属性
sourceNamestring
订单来源。
sourceIdentifierstring
在原始平台上的订单 ID。
subtotalPricestring
以商店货币表示的订单价格,扣除折扣后,不包括运费、关税、税金和小费。
tagsstring
附加到订单上的标记,格式为逗号分隔值的字符串。标签是额外的简短描述符,通常用于过滤和搜索。每个标签的长度限制为 40 个字符。
taxesIncludedboolean
订单小计中是否包含税金。
dutiesIncludedboolean
关税是否包含在订单小计中。
totalDiscountsstring
以商店货币表示的应用于订单价格的总折扣。
totalLineItemsPricestring
以商店货币表示的所有行项目价格的总和。
totalOutstandingstring
以商店货币计算的订单未付款总额。
totalPricestring
以商店货币表示的所有行项目价格、折扣、运费、税和小费的总和。
totalTaxstring
以商店货币表示的应用于订单的所有税目的价格总和,包括已退款和已取消的税目。
totalWeightnumber
以克为单位的所有项目重量的总和。
updatedAtstring
最后一次修改订单的日期和时间。
bash
curl -X GET \ 
https://{shop}.genmystore.com/api/202412/orders" \ 
-H "X-Genstore-Access-Token: {access_token}" \
json
HTTP/1.1 200 OK
{
  "orders": [
    {
      "note": "Customer changed their mind.",
      "sourceIdentifier": "ORDERID-123",
      "totalOutstanding": "5.00",
      "currentTotalDiscounts": "10.00",
      "orderId": "1001",
      "totalPrice": "409.94",
      "totalDiscounts": "0.00",
      "paymentGatewayNames": "[\"authorize_net\",\"Cash on Delivery (COD)\"]",
      "currentTotalTax": "10.00",
      "fulfillmentStatus": "partial",
      "currentTotalPrice": "10.00",
      "currentSubtotalPrice": "10.00",
      "lineItems": [
        {
          "variantTitle": "Pink",
          "quantity": "1",
          "productId": "7513594",
          "taxable": "true",
          "title": "IPod Nano",
          "fulfillableQuantity": "1",
          "fulfillmentStatus": "fulfilled",
          "requiresShipping": "true",
          "price": "199.99",
          "giftCard": "false",
          "totalDiscount": "5.00",
          "id": "669751112",
          "variantId": "4264112",
          "grams": "500",
          "sku": "IPOD-342-N",
          "currentQuantity": "1"
        }
      ],
      "totalTax": "11.94",
      "createdAt": "2008-01-10T11:00:00-05:00",
      "fulfillments": [
        {
          "createdAt": "2022-01-01T11:00:00-01:00",
          "orderId": "3183479",
          "fulfillId": "255858046",
          "status": "failure",
          "updatedAt": "2022-01-01T11:00:00-01:00\""
        }
      ],
      "presentmentCurrency": "CAD",
      "dutiesIncluded": "false",
      "currency": "USD",
      "cancelReason": "customer",
      "closedAt": "2008-01-10T11:00:00-05:00",
      "subtotalPrice": "398.00",
      "email": "[email protected]",
      "paymentTerms": {
        "amount": "70",
        "currency": "CAD"
      },
      "updatedAt": "2012-08-24T14:02:15-04:00",
      "taxesIncluded": "false",
      "discountCodes": [
        {
          "amount": "30.00",
          "code": "SPRING30",
          "type": "fixed_amount"
        }
      ],
      "cancelledAt": "null",
      "tags": "imported, vip",
      "buyerAcceptsMarketing": "false",
      "phone": "+557734881234",
      "totalLineItemsPrice": "398.00",
      "financialStatus": "paid",
      "totalWeight": "300",
      "shippingAddress": {
        "zip": "K2P0V6",
        "country": "Canada",
        "lastName": "Bobsen",
        "address2": "Amoebobacterieae",
        "city": "Ottawa",
        "address1": "123 Amoebobacterieae St",
        "provinceCode": "ON",
        "latitude": "45.41634",
        "firstName": "Bob",
        "province": "Ontario",
        "phone": "555-625-1199",
        "countryCode": "CA",
        "name": "Bob Bobsen",
        "longitude": "-75.6868"
      },
      "billingAddress": {
        "zip": "T0E 0M0",
        "country": "Canada",
        "lastName": "Gorski",
        "address2": "Apartment 5",
        "city": "Drayton Valley",
        "address1": "2259 Park Ct",
        "provinceCode": "AB",
        "latitude": "45.41634",
        "firstName": "Christopher",
        "province": "Alberta",
        "phone": "(555)555-5555",
        "countryCode": "CA",
        "name": "Christopher Gorski",
        "longitude": "-75.6868"
      },
      "sourceName": "instagram",
      "customer": {
        "lastName": "Norman",
        "note": "A note about the customer.",
        "addresses": "",
        "taxExempt": "true",
        "taxExemptions": "[\"CA_STATUS_CARD_EXEMPTION\",\"CA_BC_RESELLER_EXEMPTION\"]",
        "tags": "loyal",
        "createdAt": "2013-06-27T08:48:27-04:00",
        "firstName": "John",
        "phone": "16135551111",
        "currency": "JPY",
        "id": "207119551",
        "state": "disabled",
        "email": "[email protected]",
        "updatedAt": "2012-08-24T14:01:46-04:00",
        "verifiedEmail": "true",
        "defaultAddress": ""
      }
    }
  ]
}

GET 获取订单数量

检索满足指定条件的订单总数。

访问范围

需要以下任意访问权限: read_orders write_orders

接口

GET /api/202412/orders/count 

请求参数

createdAtMaxstring
显示在日期或日期之前创建的订单。
financialStatusstring
按支付状态过滤订单。
createdAtMinstring
显示在日期或日期之后创建的订单。
updatedAtMinstring
显示订单最后更新日期或之后的日期。
fulfillmentStatusstring
按履约状态过滤订单。
updatedAtMaxstring
显示订单最后更新日期或之前的日期。

响应数据

countnumber
检索出的订单总数量。
bash
curl -X GET \ 
https://{shop}.genmystore.com/api/202412/orders/count" \ 
-H "X-Genstore-Access-Token: {access_token}" \
json
HTTP/1.1 200 OK
{
  "count": "500"
}

GET 获取订单详情

通过指定 ID 检索订单。

访问范围

需要以下任意访问权限: read_orders write_orders

接口

GET /api/202412/orders/{orderId} 

请求参数

orderIdnumber
订单的唯一标识。

响应数据

orderobject
返回订单详细资料信息。
- 收起属性
billingAddressobject
与付款方式相关联的邮寄地址。此地址是一个可选字段,对于不需要付款方式的订单将不可用。
+ 展开属性
buyerAcceptsMarketingboolean
客户是否同意接收来自商店的电子邮件更新。
cancelReasonstring
订单被取消的原因。
cancelledAtstring
订单被取消的日期和时间。如果未取消订单,则返回 null。
closedAtstring
订单关闭的日期和时间(ISO 8601格式)。如果订单未关闭则返回 null。
createdAtstring
创建订单时自动生成的日期和时间(ISO 8601格式)。此属性的值不能更改。
currencystring
商店货币代码。
currentTotalDiscountsstring
当前以商店货币表示的订单总折扣。
currentTotalPricestring
以商店货币表示的当前订单总价。
currentSubtotalPricestring
所有行项目在折扣和退货后的价格总和,以商店货币表示。
currentTotalTaxstring
以商店货币表示的应用于订单的所有税目的价格总和,不包括已退款和已取消的税目。
customerobject
客户信息。
+ 展开属性
discountCodesarray
应用于订单的折扣列表。
+ 展开属性
emailstring
客户的电子邮件地址。
financialStatusstring
与订单相关的付款状态。
fulfillmentsarray
履约单列表。
+ 展开属性
fulfillmentStatusstring
订单履约状态。
lineItemsarray
订单项列表。
+ 展开属性
notestring
订单备注。
orderIdnumber
订单号。
paymentTermsobject
支付项列表。
+ 展开属性
paymentGatewayNamesarray
订单支付网关列表。
phonestring
客户接收短信通知的电话号码。
presentmentCurrencystring
用于向客户显示价格的显示货币。
shippingAddressobject
订单将被运送到的邮寄地址。此地址是可选的,将不可用于不需要送货的订单。
+ 展开属性
sourceNamestring
订单来源。
sourceIdentifierstring
在原始平台上的订单 ID。
subtotalPricestring
以商店货币表示的订单价格,扣除折扣后,不包括运费、关税、税金和小费。
tagsstring
附加到订单上的标记,格式为逗号分隔值的字符串。标签是额外的简短描述符,通常用于过滤和搜索。每个标签的长度限制为 40 个字符。
taxesIncludedboolean
订单小计中是否包含税金。
dutiesIncludedboolean
关税是否包含在订单小计中。
totalDiscountsstring
以商店货币表示的应用于订单价格的总折扣。
totalLineItemsPricestring
以商店货币表示的所有行项目价格的总和。
totalOutstandingstring
以商店货币计算的订单未付款总额。
totalPricestring
以商店货币表示的所有行项目价格、折扣、运费、税和小费的总和。
totalTaxstring
以商店货币表示的应用于订单的所有税目的价格总和,包括已退款和已取消的税目。
totalWeightnumber
以克为单位的所有项目重量的总和。
updatedAtstring
最后一次修改订单的日期和时间。
bash
curl -X GET \ 
https://{shop}.genmystore.com/api/202412/orders/{orderId}" \ 
-H "X-Genstore-Access-Token: {access_token}" \
json
HTTP/1.1 200 OK
{
  "order": {
    "note": "Customer changed their mind.",
    "sourceIdentifier": "ORDERID-123",
    "totalOutstanding": "5.00",
    "currentTotalDiscounts": "10.00",
    "orderId": "1001",
    "totalPrice": "409.94",
    "totalDiscounts": "0.00",
    "paymentGatewayNames": [
      "authorize_net",
      "Cash on Delivery (COD)"
    ],
    "currentTotalTax": "10.00",
    "fulfillmentStatus": "partial",
    "currentTotalPrice": "10.00",
    "currentSubtotalPrice": "10.00",
    "lineItems": [
      {
        "variantTitle": "Pink",
        "quantity": "1",
        "productId": "7513594",
        "taxable": "true",
        "title": "IPod Nano",
        "fulfillableQuantity": "1",
        "fulfillmentStatus": "fulfilled",
        "requiresShipping": "true",
        "price": "199.99",
        "giftCard": "false",
        "totalDiscount": "5.00",
        "id": "669751112",
        "variantId": "4264112",
        "grams": "500",
        "sku": "IPOD-342-N",
        "currentQuantity": "1"
      }
    ],
    "totalTax": "11.94",
    "createdAt": "2008-01-10T11:00:00-05:00",
    "fulfillments": [
      {
        "createdAt": "2022-01-01T11:00:00-01:00",
        "orderId": "3183479",
        "fulfillId": "255858046",
        "status": "failure",
        "updatedAt": "2022-01-01T11:00:00-01:00\""
      }
    ],
    "presentmentCurrency": "CAD",
    "dutiesIncluded": "false",
    "currency": "USD",
    "cancelReason": "customer",
    "closedAt": "2008-01-10T11:00:00-05:00",
    "subtotalPrice": "398.00",
    "email": "[email protected]",
    "paymentTerms": {
      "amount": "70",
      "currency": "CAD"
    },
    "updatedAt": "2012-08-24T14:02:15-04:00",
    "taxesIncluded": "false",
    "discountCodes": [
      {
        "amount": "30.00",
        "code": "SPRING30",
        "type": "fixed_amount"
      }
    ],
    "cancelledAt": "null",
    "tags": "imported, vip",
    "buyerAcceptsMarketing": "false",
    "phone": "+557734881234",
    "totalLineItemsPrice": "398.00",
    "financialStatus": "paid",
    "totalWeight": "300",
    "shippingAddress": {
      "zip": "K2P0V6",
      "country": "Canada",
      "lastName": "Bobsen",
      "address2": "Amoebobacterieae",
      "city": "Ottawa",
      "address1": "123 Amoebobacterieae St",
      "provinceCode": "ON",
      "latitude": "45.41634",
      "firstName": "Bob",
      "province": "Ontario",
      "phone": "555-625-1199",
      "countryCode": "CA",
      "name": "Bob Bobsen",
      "longitude": "-75.6868"
    },
    "billingAddress": {
      "zip": "T0E 0M0",
      "country": "Canada",
      "lastName": "Gorski",
      "address2": "Apartment 5",
      "city": "Drayton Valley",
      "address1": "2259 Park Ct",
      "provinceCode": "AB",
      "latitude": "45.41634",
      "firstName": "Christopher",
      "province": "Alberta",
      "phone": "(555)555-5555",
      "countryCode": "CA",
      "name": "Christopher Gorski",
      "longitude": "-75.6868"
    },
    "sourceName": "instagram",
    "customer": {
      "lastName": "Norman",
      "note": "A note about the customer.",
      "taxExempt": "true",
      "taxExemptions": [
        "CA_STATUS_CARD_EXEMPTION",
        "CA_BC_RESELLER_EXEMPTION"
      ],
      "tags": "loyal",
      "createdAt": "2013-06-27T08:48:27-04:00",
      "firstName": "John",
      "phone": "16135551111",
      "currency": "JPY",
      "id": "207119551",
      "state": "disabled",
      "email": "[email protected]",
      "updatedAt": "2012-08-24T14:01:46-04:00",
      "verifiedEmail": "true",
      "defaultAddress": ""
    }
  }
}