Shopify API – Fulfillment

top

Receive a list of all Fulfillments

Available URL Query parameters:

  • limit — Amount of results (default: 50) (maximum: 250)
  • page — Page to show (default: 1)
  • created_at_min — Show fulfillments created after date (format: 2008-01-01 03:00)
  • created_at_max — Show fulfillments created before date (format: 2008-01-01 03:00)
  • updated_at_min — Show fulfillments last updated after date (format: 2008-01-01 03:00)
  • updated_at_max — Show fulfillments last updated before date (format: 2008-01-01 03:00)
GET /admin/orders/#{id}/fulfillments.xml

Get a list of all fulfillments for an order.

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<fulfillments type="array">
  <fulfillment>
    <created-at type="datetime">2010-02-10T14:04:12-05:00</created-at>
    <id type="integer">255858046</id>
    <order-id type="integer">450789469</order-id>
    <status>failed</status>
    <tracking-number>1Z2345</tracking-number>
    <updated-at type="datetime">2010-02-10T14:04:12-05:00</updated-at>
    <line-items type="array">
      <line-item>
        <fulfillment-service>manual</fulfillment-service>
        <fulfillment-status nil="true"></fulfillment-status>
        <grams type="integer">200</grams>
        <id type="integer">466157049</id>
        <price type="decimal">199.00</price>
        <product-id type="integer">632910392</product-id>
        <quantity type="integer">1</quantity>
        <requires-shipping type="boolean">true</requires-shipping>
        <sku>IPOD2008GREEN</sku>
        <title>IPod Nano - 8gb</title>
        <variant-id type="integer">39072856</variant-id>
        <variant-title>green</variant-title>
        <vendor nil="true"></vendor>
        <name>IPod Nano - 8gb - green</name>
      </line-item>
    </line-items>
    <receipt type="yaml">--- 
testcase: true
authorization: &quot;123456&quot;
</receipt>
  </fulfillment>
</fulfillments>
top

Receive a count of all Fulfillments

Available URL Query parameters:

  • created_at_min — Count fulfillments created after date (format: 2008-01-01 03:00)
  • created_at_max — Count fulfillments created before date (format: 2008-01-01 03:00)
  • updated_at_min — Count fulfillments last updated after date (format: 2008-01-01 03:00)
  • updated_at_max — Count fulfillments last updated before date (format: 2008-01-01 03:00)
GET /admin/orders/#{id}/fulfillments/count.xml

Count all the total number of fulfillments for an order.

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<count type="integer">1</count>
top

Receive a single Fulfillment

GET /admin/orders/#{id}/fulfillments/#{id}.xml

Get the XML Representation of a specific fulfillment.

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<fulfillment>
  <created-at type="datetime">2010-02-10T14:04:12-05:00</created-at>
  <id type="integer">255858046</id>
  <order-id type="integer">450789469</order-id>
  <status>failed</status>
  <tracking-number>1Z2345</tracking-number>
  <updated-at type="datetime">2010-02-10T14:04:12-05:00</updated-at>
  <line-items type="array">
    <line-item>
      <fulfillment-service>manual</fulfillment-service>
      <fulfillment-status nil="true"></fulfillment-status>
      <grams type="integer">200</grams>
      <id type="integer">466157049</id>
      <price type="decimal">199.00</price>
      <product-id type="integer">632910392</product-id>
      <quantity type="integer">1</quantity>
      <requires-shipping type="boolean">true</requires-shipping>
      <sku>IPOD2008GREEN</sku>
      <title>IPod Nano - 8gb</title>
      <variant-id type="integer">39072856</variant-id>
      <variant-title>green</variant-title>
      <vendor nil="true"></vendor>
      <name>IPod Nano - 8gb - green</name>
    </line-item>
  </line-items>
  <receipt type="yaml">--- 
testcase: true
authorization: &quot;123456&quot;
</receipt>
</fulfillment>
top

Create a new Fulfillment

POST /admin/orders/#{id}/fulfillments.xml

Fulfill a single line item by explicitly specifying the line items to be fulfilled.

Request

           
<?xml version="1.0" encoding="UTF-8"?>
<fulfillment>
  <line-items type="array">
    <line-item>
      <id type="integer">466157049</id>
    </line-item>
  </line-items>
  <tracking-number nil="true"></tracking-number>
</fulfillment>      

Response

           
HTTP/1.1 201 Created
<?xml version="1.0" encoding="UTF-8"?>
<fulfillment>
  <created-at type="datetime">2010-02-10T14:05:10-05:00</created-at>
  <id type="integer">623721900</id>
  <order-id type="integer">450789469</order-id>
  <status>success</status>
  <tracking-number nil="true"></tracking-number>
  <updated-at type="datetime">2010-02-10T14:05:10-05:00</updated-at>
  <line-items type="array">
    <line-item>
      <fulfillment-service>manual</fulfillment-service>
      <fulfillment-status>fulfilled</fulfillment-status>
      <grams type="integer">200</grams>
      <id type="integer">466157049</id>
      <price type="decimal">199.00</price>
      <product-id type="integer">632910392</product-id>
      <quantity type="integer">1</quantity>
      <requires-shipping type="boolean">true</requires-shipping>
      <sku>IPOD2008GREEN</sku>
      <title>IPod Nano - 8gb</title>
      <variant-id type="integer">39072856</variant-id>
      <variant-title>green</variant-title>
      <vendor nil="true"></vendor>
      <name>IPod Nano - 8gb - green</name>
    </line-item>
  </line-items>
  <receipt type="yaml">--- {}

</receipt>
</fulfillment>
POST /admin/orders/#{id}/fulfillments.xml

Fulfill all line items for an order and send the shipping confirmation email. Not specifying line item IDs causes all line items for the order to be fulfilled.

Request

           
<?xml version="1.0" encoding="UTF-8"?>
<fulfillment>
  <notify-customer type="boolean">true</notify-customer>
  <tracking-number>123456789</tracking-number>
</fulfillment>      

Response

           
HTTP/1.1 201 Created
<?xml version="1.0" encoding="UTF-8"?>
<fulfillment>
  <created-at type="datetime">2010-02-10T14:05:12-05:00</created-at>
  <id type="integer">623721901</id>
  <order-id type="integer">450789469</order-id>
  <status>success</status>
  <tracking-number>123456789</tracking-number>
  <updated-at type="datetime">2010-02-10T14:05:12-05:00</updated-at>
  <line-items type="array">
    <line-item>
      <fulfillment-service>manual</fulfillment-service>
      <fulfillment-status>fulfilled</fulfillment-status>
      <grams type="integer">200</grams>
      <id type="integer">466157049</id>
      <price type="decimal">199.00</price>
      <product-id type="integer">632910392</product-id>
      <quantity type="integer">1</quantity>
      <requires-shipping type="boolean">true</requires-shipping>
      <sku>IPOD2008GREEN</sku>
      <title>IPod Nano - 8gb</title>
      <variant-id type="integer">39072856</variant-id>
      <variant-title>green</variant-title>
      <vendor nil="true"></vendor>
      <name>IPod Nano - 8gb - green</name>
    </line-item>
    <line-item>
      <fulfillment-service>manual</fulfillment-service>
      <fulfillment-status>fulfilled</fulfillment-status>
      <grams type="integer">200</grams>
      <id type="integer">703073504</id>
      <price type="decimal">199.00</price>
      <product-id type="integer">632910392</product-id>
      <quantity type="integer">1</quantity>
      <requires-shipping type="boolean">true</requires-shipping>
      <sku>IPOD2008BLACK</sku>
      <title>IPod Nano - 8gb</title>
      <variant-id type="integer">457924702</variant-id>
      <variant-title>black</variant-title>
      <vendor nil="true"></vendor>
      <name>IPod Nano - 8gb - black</name>
    </line-item>
  </line-items>
  <receipt type="yaml">--- {}

</receipt>
</fulfillment>
POST /admin/orders/#{id}/fulfillments.xml

Fulfill line items without a tracking number

Request

           
<?xml version="1.0" encoding="UTF-8"?>
<fulfillment>
  <line-items type="array">
    <line-item>
      <id type="integer">466157049</id>
    </line-item>
    <line-item>
      <id type="integer">703073504</id>
    </line-item>
  </line-items>
  <tracking-number nil="true"></tracking-number>
</fulfillment>      

Response

           
HTTP/1.1 201 Created
<?xml version="1.0" encoding="UTF-8"?>
<fulfillment>
  <created-at type="datetime">2010-02-10T14:05:13-05:00</created-at>
  <id type="integer">623721902</id>
  <order-id type="integer">450789469</order-id>
  <status>success</status>
  <tracking-number nil="true"></tracking-number>
  <updated-at type="datetime">2010-02-10T14:05:13-05:00</updated-at>
  <line-items type="array">
    <line-item>
      <fulfillment-service>manual</fulfillment-service>
      <fulfillment-status>fulfilled</fulfillment-status>
      <grams type="integer">200</grams>
      <id type="integer">466157049</id>
      <price type="decimal">199.00</price>
      <product-id type="integer">632910392</product-id>
      <quantity type="integer">1</quantity>
      <requires-shipping type="boolean">true</requires-shipping>
      <sku>IPOD2008GREEN</sku>
      <title>IPod Nano - 8gb</title>
      <variant-id type="integer">39072856</variant-id>
      <variant-title>green</variant-title>
      <vendor nil="true"></vendor>
      <name>IPod Nano - 8gb - green</name>
    </line-item>
    <line-item>
      <fulfillment-service>manual</fulfillment-service>
      <fulfillment-status>fulfilled</fulfillment-status>
      <grams type="integer">200</grams>
      <id type="integer">703073504</id>
      <price type="decimal">199.00</price>
      <product-id type="integer">632910392</product-id>
      <quantity type="integer">1</quantity>
      <requires-shipping type="boolean">true</requires-shipping>
      <sku>IPOD2008BLACK</sku>
      <title>IPod Nano - 8gb</title>
      <variant-id type="integer">457924702</variant-id>
      <variant-title>black</variant-title>
      <vendor nil="true"></vendor>
      <name>IPod Nano - 8gb - black</name>
    </line-item>
  </line-items>
  <receipt type="yaml">--- {}

</receipt>
</fulfillment>
top

Modify an existing Fulfillment

PUT /admin/orders/#{id}/fulfillments/#{id}.xml

Update tracking number for a fulfillment.

Request

           
<?xml version="1.0" encoding="UTF-8"?>
<fulfillment>
  <id type="integer">255858046</id>
  <tracking-number>987654321</tracking-number>
</fulfillment>      

Response

           
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<fulfillment>
  <created-at type="datetime">2010-02-10T14:04:12-05:00</created-at>
  <id type="integer">255858046</id>
  <order-id type="integer">450789469</order-id>
  <status>failed</status>
  <tracking-number>987654321</tracking-number>
  <updated-at type="datetime">2010-02-10T14:05:17-05:00</updated-at>
  <line-items type="array">
    <line-item>
      <fulfillment-service>manual</fulfillment-service>
      <fulfillment-status nil="true"></fulfillment-status>
      <grams type="integer">200</grams>
      <id type="integer">466157049</id>
      <price type="decimal">199.00</price>
      <product-id type="integer">632910392</product-id>
      <quantity type="integer">1</quantity>
      <requires-shipping type="boolean">true</requires-shipping>
      <sku>IPOD2008GREEN</sku>
      <title>IPod Nano - 8gb</title>
      <variant-id type="integer">39072856</variant-id>
      <variant-title>green</variant-title>
      <vendor nil="true"></vendor>
      <name>IPod Nano - 8gb - green</name>
    </line-item>
  </line-items>
  <receipt type="yaml">--- 
testcase: true
authorization: &quot;123456&quot;
</receipt>
</fulfillment>
Last updated at Feb 2010 Feb:02 PM.