通过API输入的MailChimp电子商务订单未显示在活动供稿中

问题描述 投票:0回答:1

我正在设置API调用,以将Squarespace电子商务产品/客户/订单加入Mailchimp。我特别需要将交易显示在客户帐户的“活动Feed”中,但是我没有找到任何文档或答案。 The orders are adding to the 'Total Revenue' box, but not showing up on the activity feed. Screenshot attached.

到目前为止,我在Postman中摆弄了几个选项。在将其集成到我的其余代码中之前,我试图弄清楚如何使调用生效。我已经阅读了MailChimp网站上的所有电子商务文档。订单文档链接在下面。https://mailchimp.com/developer/reference/ecommerce-stores/ecommerce-orders/这是我通过邮递员发送的内容:

Post URL: https://us12.api.mailchimp.com/3.0/ecommerce/stores/test_store/orders
    Body: {"id": "SAROrd000003",
"customer": {"id": "SAR000001"},
"currency_code": "USD",
"order_total": "50.00",
"lines": [{"id": "misc", "product_id": "misc", "product_variant_id":"none","quantity":1,"price":"50.00"}]
}

这是我从邮递员那里得到的答复

{
"id": "SAROrd000003",
"customer": {
    "id": "SAR000001",
    "email_address": "[email protected]",
    "opt_in_status": false,
    "company": "",
    "first_name": "",
    "last_name": "",
    "orders_count": 3,
    "total_spent": 150,
    "address": {
        "address1": "",
        "address2": "",
        "city": "",
        "province": "",
        "province_code": "",
        "postal_code": "",
        "country": "",
        "country_code": ""
    },
    "created_at": "2019-11-27T00:52:34+00:00",
    "updated_at": "2019-11-27T02:38:51+00:00",
    "_links": [
        {
            "rel": "self",
            "href": "https://us12.api.mailchimp.com/3.0/ecommerce/stores/test_store/customers/SAR000001",
            "method": "GET",
            "targetSchema": "https://us12.api.mailchimp.com/schema/3.0/Definitions/Ecommerce/Stores/Customers/Response.json"
        },
        {
            "rel": "parent",
            "href": "https://us12.api.mailchimp.com/3.0/ecommerce/stores/test_store/customers",
            "method": "GET",
            "targetSchema": "https://us12.api.mailchimp.com/schema/3.0/Definitions/Ecommerce/Stores/Customers/CollectionResponse.json"
        },
        {
            "rel": "update",
            "href": "https://us12.api.mailchimp.com/3.0/ecommerce/stores/test_store/customers/SAR000001",
            "method": "PATCH",
            "targetSchema": "https://us12.api.mailchimp.com/schema/3.0/Definitions/Ecommerce/Stores/Customers/Response.json",
            "schema": "https://us12.api.mailchimp.com/schema/3.0/Definitions/Ecommerce/Stores/Customers/PATCH.json"
        },
        {
            "rel": "upsert",
            "href": "https://us12.api.mailchimp.com/3.0/ecommerce/stores/test_store/customers/SAR000001",
            "method": "PUT",
            "targetSchema": "https://us12.api.mailchimp.com/schema/3.0/Definitions/Ecommerce/Stores/Customers/Response.json",
            "schema": "https://us12.api.mailchimp.com/schema/3.0/Definitions/Ecommerce/Stores/Customers/PUT.json"
        },
        {
            "rel": "delete",
            "href": "https://us12.api.mailchimp.com/3.0/ecommerce/stores/test_store/customers/SAR000001",
            "method": "DELETE"
        }
    ]
},
"store_id": "test_store",
"campaign_id": "",
"landing_site": "",
"financial_status": "",
"fulfillment_status": "",
"currency_code": "USD",
"order_total": 50,
"order_url": "",
"discount_total": 0,
"tax_total": 0,
"shipping_total": 0,
"tracking_code": "",
"processed_at_foreign": "",
"cancelled_at_foreign": "",
"updated_at_foreign": "",
"shipping_address": {
    "name": "",
    "address1": "",
    "address2": "",
    "city": "",
    "province": "",
    "province_code": "",
    "postal_code": "",
    "country": "",
    "country_code": "",
    "longitude": 0,
    "latitude": 0,
    "phone": "",
    "company": ""
},
"billing_address": {
    "name": "",
    "address1": "",
    "address2": "",
    "city": "",
    "province": "",
    "province_code": "",
    "postal_code": "",
    "country": "",
    "country_code": "",
    "longitude": 0,
    "latitude": 0,
    "phone": "",
    "company": ""
},
"lines": [
    {
        "id": "misc",
        "product_id": "misc",
        "product_title": "misc",
        "product_variant_id": "none",
        "product_variant_title": "none",
        "quantity": 1,
        "price": 50,
        "discount": 0,
        "_links": [
            {
                "rel": "self",
                "href": "https://us12.api.mailchimp.com/3.0/ecommerce/stores/test_store/orders/SAROrd000003/lines/misc",
                "method": "GET",
                "targetSchema": "https://us12.api.mailchimp.com/schema/3.0/Definitions/Ecommerce/Stores/Orders/Lines/Response.json"
            },
            {
                "rel": "parent",
                "href": "https://us12.api.mailchimp.com/3.0/ecommerce/stores/test_store/orders/SAROrd000003",
                "method": "GET",
                "targetSchema": "https://us12.api.mailchimp.com/schema/3.0/Definitions/Ecommerce/Stores/Orders/Lines/CollectionResponse.json"
            },
            {
                "rel": "update",
                "href": "https://us12.api.mailchimp.com/3.0/ecommerce/stores/test_store/orders/SAROrd000003/lines/misc",
                "method": "PATCH",
                "targetSchema": "https://us12.api.mailchimp.com/schema/3.0/Definitions/Ecommerce/Stores/Orders/Lines/Response.json",
                "schema": "https://us12.api.mailchimp.com/schema/3.0/Definitions/Ecommerce/Stores/Orders/Lines/PATCH.json"
            },
            {
                "rel": "delete",
                "href": "https://us12.api.mailchimp.com/3.0/ecommerce/stores/test_store/orders/SAROrd000003/lines/misc",
                "method": "DELETE"
            }
        ]
    }
],
"_links": [
    {
        "rel": "self",
        "href": "https://us12.api.mailchimp.com/3.0/ecommerce/stores/test_store/orders/SAROrd000003",
        "method": "GET",
        "targetSchema": "https://us12.api.mailchimp.com/schema/3.0/Definitions/Ecommerce/Stores/Orders/Response.json"
    },
    {
        "rel": "parent",
        "href": "https://us12.api.mailchimp.com/3.0/ecommerce/stores/test_store/orders",
        "method": "GET",
        "targetSchema": "https://us12.api.mailchimp.com/schema/3.0/Definitions/Ecommerce/Stores/Orders/CollectionResponse.json"
    },
    {
        "rel": "update",
        "href": "https://us12.api.mailchimp.com/3.0/ecommerce/stores/test_store/orders/SAROrd000003",
        "method": "PATCH",
        "targetSchema": "https://us12.api.mailchimp.com/schema/3.0/Definitions/Ecommerce/Stores/Orders/Response.json",
        "schema": "https://us12.api.mailchimp.com/schema/3.0/Definitions/Ecommerce/Stores/Orders/PATCH.json"
    },
    {
        "rel": "delete",
        "href": "https://us12.api.mailchimp.com/3.0/ecommerce/stores/test_store/orders/SAROrd000003",
        "method": "DELETE"
    }
]

}

mailchimp
1个回答
0
投票

我与他们的API小组的人交谈。将ISO-8601格式的订单日期提交到“ processed_at_foreign”参数中可以解决此问题。

© www.soinside.com 2019 - 2024. All rights reserved.