cloning order - trying to recuperate transactions from original order

Highlighted
Shopify Partner
2 0 0

Using API to do the following.

  • 'Cloning' an order (copying as many attributes as I can to new order).
  • transferring transactions from original order to clone.
  • adding an item in the process

Was expecting 'Collect' button to appear in the admin of new order, but no success.

 

Screen Shot 2020-11-03 at 9.38.55 AM.png

Here's an example the an order creation payload.

 

 

 

{
    "line_items": [
        {
            "id": 5943207231574,
            "variant_id": 19718145310806,
            "title": "Bria",
            "quantity": 2,
            "sku": "R274T",
            "variant_title": "0 / Standard",
            "vendor": "Amsale",
            "fulfillment_service": "manual",
            "product_id": 1997851721814,
            "requires_shipping": true,
            "taxable": true,
            "gift_card": false,
            "name": "Bria - 0 / Standard",
            "variant_inventory_management": "shopify",
            "product_exists": true,
            "fulfillable_quantity": 2,
            "grams": 0,
            "price": "1080.00",
            "total_discount": "0.00",
            "fulfillment_status": null,
            "price_set": {"shop_money": {"amount": "1080.00",
                                         "currency_code": "USD"},
                          "presentment_money": {"amount": "1080.00",
                                                "currency_code": "USD"}},
            "total_discount_set": {"shop_money": {"amount": "0.00",
                                                  "currency_code": "USD"},
                                   "presentment_money": {"amount": "0.00",
                                                         "currency_code": "USD"}},
            "discount_allocations": [],
            "admin_graphql_api_id": "gid://shopify/LineItem/5943207231574",
            "tax_lines": []},
        {
            "id": 5959822770262,
            "variant_id": 19717937102934,
            "title": "Gwyneth",
            "quantity": 1,
            "sku": "GB084P",
            "variant_title": "Ice / Standard",
            "vendor": "Amsale",
            "fulfillment_service": "manual",
            "product_id": 1997841727574,
            "requires_shipping": true,
            "taxable": true,
            "gift_card": false,
            "name": "Gwyneth - Ice / Standard",
            "variant_inventory_management": null,
            "properties": [],
            "product_exists": true,
            "fulfillable_quantity": 1,
            "grams": 0,
            "price": "130.00",
            "total_discount": "0.00",
            "fulfillment_status": null,
            "price_set": {"shop_money": {"amount": "130.00",
                                         "currency_code": "USD"},
                          "presentment_money": {"amount": "130.00",
                                                "currency_code": "USD"}},
            "total_discount_set": {"shop_money": {"amount": "0.00",
                                                  "currency_code": "USD"},
                                   "presentment_money": {"amount": "0.00",
                                                         "currency_code": "USD"}},
            "discount_allocations": [],
            "admin_graphql_api_id": "gid://shopify/LineItem/5959822770262",
            "tax_lines": []
        }
    ],
    "email": "test@fungo.ca",
    "name": "#WS1196",
    "shipping_address": {
        "first_name": "David",
        "address1": "4104 Hillsboro Pike",
        "phone": null,
        "city": "Nashville",
        "zip": "37215",
        "province": "Tennessee",
        "country": "United States",
        "last_name": "R",
        "address2": "",
        "company": "",
        "latitude": 36.1020162,
        "longitude": -86.816817,
        "name": "David Rivard-Larochelle",
        "country_code": "US",
        "province_code": "TN"},
    "billing_address": {
        "first_name": "David",
        "address1": "4104 Hillsboro Pike",
        "phone": null,
        "city": "Nashville",
        "zip": "37215",
        "province": "Tennessee",
        "country": "United States",
        "last_name": "R",
        "address2": "",
        "company": "",
        "latitude": 36.1020162,
        "longitude": -86.816817,
        "name": "David Rivard-Larochelle",
        "country_code": "US",
        "province_code": "TN"},
    "customer": {
        "id": 2048056688726,
        "email": "test@fungo.ca",
        "accepts_marketing": false,
        "created_at": "2019-06-21T08:30:02-04:00",
        "updated_at": "2020-11-02T15:01:36-05:00",
        "first_name": "David",
        "last_name": "R",
        "orders_count": 100,
        "state": "enabled",
        "total_spent": "341545.00",
        "last_order_id": 2767269789782,
        "note": "Store ID: 6661",
        "verified_email": true,
        "multipass_identifier": null,
        "tax_exempt": false,
        "phone": "+14189516076",
        "tags": "amsale-bridal, amsale-bridesmaids, amsale_x_you_bridal, little-white-dresses, nouvelle-amsale-bridal, nouvelle-amsale-bridesmaids, swatch-bridesmaids, swatch-nouvelle",
        "last_order_name": "#WS1198",
        "currency": "USD",
        "accepts_marketing_updated_at": "2019-06-21T08:30:02-04:00",
        "marketing_opt_in_level": null,
        "tax_exemptions": [],
        "admin_graphql_api_id": "gid://shopify/Customer/2048056688726",
        "default_address": {
            "id": 2198795124822,
            "customer_id": 2048056688726,
            "first_name": "David",
            "last_name": "Rivard-Larochelle",
            "company": null,
            "address1": "4104 Hillsboro Pike",
            "address2": "",
            "city": "Nashville",
            "province": "Tennessee",
            "country": "United States",
            "zip": "37215",
            "phone": null,
            "name": "David Rivard-Larochelle",
            "province_code": "TN",
            "country_code": "US",
            "country_name": "United States",
            "default": true
        }
    },
    "contact_email": "test@fungo.ca",
    "shipping_lines": [
        {
            "id": 2287548956758,
            "title": "Shipping included",
            "price": "0.00",
            "code": "Shipping included",
            "source": "shopify",
            "phone": null,
            "requested_fulfillment_service_id": null,
            "delivery_category": null,
            "carrier_identifier": null,
            "discounted_price": "0.00",
            "price_set": {"shop_money": {"amount": "0.00",
                                         "currency_code": "USD"},
                          "presentment_money": {"amount": "0.00",
                                                "currency_code": "USD"}},
            "discounted_price_set": {"shop_money": {"amount": "0.00",
                                                    "currency_code": "USD"},
                                     "presentment_money": {"amount": "0.00",
                                                           "currency_code": "USD"}},
            "discount_allocations": [],
            "tax_lines": []
        }
    ],
    "refunds": [],
    "fulfillments": [],
    "referring_site": "",
    "currency": "USD",
    "test": true,
    "financial_status": "partially_paid",
    "transactions": [
        {
            "kind": "authorization",
            "gateway": "bogus",
            "status": "success",
            "message": "Bogus Gateway: Forced success",
            "test": true,
            "authorization": "53433",
            "processed_at": "2020-10-29T15:29:55-04:00",
            "source_name": "web",
            "amount": "2160.00",
            "currency": "USD",
            "error_code": null,
            "receipt": {"authorized_amount": "2160.00"}},
        {
            "kind": "capture",
            "gateway": "bogus",
            "status": "success",
            "message": "Bogus Gateway: Forced success",
            "test": true,
            "authorization": null,
            "processed_at": "2020-11-03T10:31:03-05:00",
            "source_name": "1830279",
            "amount": "2160.00",
            "currency": "USD",
            "error_code": null,
            "receipt": {"paid_amount": "2160.00"}
        }
    ]
}

Any help would be appreciated.

 

0 Likes