FROM CACHE - en_header

Filfull API

William_Au_Yeun
Shopify Partner
9 0 0

Dear Sir,

When I use the following command to do the fulfillment of an order:

https:/xxxxx:yyyyy@testing-amazing-group-store.myshopify.com/admin/orders/2790616579/fulfillments.json

 

{"fulfillment":{"tracking_numbers":null,"line_items":[{"id":4998669379}]}}

, it return with

{"errors":{"fulfillment":"Required parameter missing or invalid"}}

The detail of the order is as below. Please advise how to do the fulfill using API

 

{"order":
    {"id":2790616579,
        "email":"williamay53@gmail.com",
        "closed_at":null,
        "created_at":"2016-04-24T22:37:19+08:00",
        "updated_at":"2016-04-24T22:37:29+08:00",
        "number":49,"note":null,
        "token":"4bcb22d9da220bbaf5fb92a52153ca41",
        "gateway":"Bank Deposit",
        "test":false,
        "total_price":"310.00",
        "subtotal_price":"300.00",
        "total_weight":0,
        "total_tax":"0.00",
        "taxes_included":false,
        "currency":"HKD",
        "financial_status":"paid",
        "confirmed":true,
        "total_discounts":"0.00",
        "total_line_items_price":"300.00",
        "cart_token":"1073f3a0ac7dc5507ac45ed10d51d056",
        "buyer_accepts_marketing":false,
        "name":"#1049","referring_site":"",
        "landing_site":"\/",
        "cancelled_at":null,
        "cancel_reason":null,
        "total_price_usd":"39.97",
        "checkout_token":"b590f850f09b67bbd6ae580c9d4824f7",
        "reference":null,"user_id":null,
        "location_id":null,
        "source_identifier":null,
        "source_url":null,
        "processed_at":"2016-04-24T22:37:19+08:00",
        "device_id":null,
        "browser_ip":null,
        "landing_site_ref":null,
        "order_number":1049,
        "discount_codes":[],
        "note_attributes":[],
        "payment_gateway_names":["Bank Deposit"],
        "processing_method":"manual",
        "checkout_id":7319602179,
        "source_name":"web",
        "fulfillment_status":null,
        "tax_lines":[],"tags":"",
        "contact_email":"williamay53@gmail.com",
        "order_status_url":"https:\/\/checkout.shopify.com\/11570720\/checkouts\/b590f850f09b67bbd6ae580c9d4824f7\/thank_you_token?key=e9a6e2baff6183d80301af300feda7d3",
        "line_items":[{"id":4998669379,
        "variant_id":19343582531,"title":"刻岷",
        "quantity":1,"price":"300.00",
        "grams":0,"sku":"",
        "variant_title":"Kenneth",
        "vendor":"Testing Amazing Group Store",
        "fulfillment_service":"manual",
        "product_id":6273782787,
        "requires_shipping":true,
        "taxable":true,
        "gift_card":false,
        "name":"刻岷 - Kenneth",
        "variant_inventory_management":null,"properties":[],
        "product_exists":true,"fulfillable_quantity":1,
        "total_discount":"0.00","fulfillment_status":null,
        "tax_lines":[],
        "origin_location":
        {"id":844110915,
        "country_code":"HK",
        "province_code":"",
        "name":"Testing Amazing Group Store",
        "address1":"Hong Kong",
        "address2":"","city":
        "Hong Kong","zip":"unknown"},
        "destination_location":{
        "id":1143048195,
        "country_code":"HK",
        "province_code":"",
        "name":"william auyeung",
        "address1":"flat 29k",
        "address2":"","city":
        "hong kong","zip":""}}],
        "shipping_lines":[{"id":2355200451,
        "title":"Standard Shipping",
        "price":"10.00","code":
        "Standard Shipping","source":
        "shopify","phone":null,
        "requested_fulfillment_service_id":null,
        "delivery_category":null,
        "carrier_identifier":null,
        "tax_lines":[]}],
        "billing_address":{
        "first_name":"william",
        "address1":"flat 29k",
        "phone":"93201153",
        "city":"hong kong",
        "zip":null,
        "province":null,
        "country":"Hong Kong",
        "last_name":"auyeung",
        "address2":null,"company":null,
        "latitude":22.277763,
        "longitude":114.161812,
        "name":"william auyeung",
        "country_code":"HK",
        "province_code":null},
        "shipping_address":{
        "first_name":"william",
        "address1":"flat 29k",
        "phone":"93201153","city":
        "hong kong","zip":null,
        "province":null,"country":
        "Hong Kong","last_name":
        "auyeung","address2":null,
        "company":null,
        "latitude":22.277763,"longitude":114.161812,
        "name":"william auyeung","country_code":"HK","province_code":null},
        "fulfillments":[],
        "client_details":{"browser_ip":"59.149.111.113",
        "accept_language":"zh-TW,zh;q=0.8,en-US;q=0.5,en;q=0.3",
        "user_agent":"Mozilla\/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko\/20100101 Firefox\/45.0",
        "session_hash":"eddc97828bc2bcd02d425cab0dc45f70",
        "browser_width":1920,"browser_height":945},
        "refunds":[],"customer":{"id":2558342787,
        "email":"williamay53@gmail.com",
        "accepts_marketing":false,
        "created_at":"2016-02-15T23:30:47+08:00",
        "updated_at":"2016-06-29T22:18:32+08:00",
        "first_name":"sdfsdf",
        "last_name":"fsdf",
        "orders_count":36,
        "state":"disabled",
        "total_spent":"105275.00",
        "last_order_id":3213444291,
        "note":null,"verified_email":true,
        "multipass_identifier":null,
        "tax_exempt":false,"tags":"",
        "last_order_name":"#1052",
        "default_address":{"id":3716477763,
        "first_name":"sdfsdf","last_name":"fsdf","company":null,
        "address1":"fsdf","address2":null,
        "city":"fdfsd",
        "province":null,
        "country":"Hong Kong",
        "zip":null,
        "phone":"33334343","name":"sdfsdf fsdf",
        "province_code":null,
        "country_code":"HK",
        "country_name":"Hong Kong",
        "default":true}
        }}}

 

 

Replies 2 (2)
Jamie_D_
Shopify Staff (Retired)
Shopify Staff (Retired)
533 1 107

Hi William,

I was able to create a fulfillment on that particular order using the exact JSON request that you have provided in your post:

{"fulfillment":{"tracking_numbers":null,"line_items":[{"id":4998669379}]}}

I received a response with status 201 Created. It's possible that your application may be sending malformed JSON. Make sure you are passing Content-Type=applcation/json in the header of the request. I would suggest logging the raw request that your application is sending or testing with a tool such as Postman.

Jamie | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

William_Au_Yeun
Shopify Partner
9 0 0

it is ok now, thx