Fulfillment

A fulfillment represents a shipment of one or more items in an order. When we say that an order has been completely fulfilled, we mean that all the items that make up that order have been sent to the customer.

#

Ideally, a shop owner would want to make just one fulfillment per order, but there are times when the availability or size of items in the order make it necessary to make more than one shipment, which is why an order can have one or more fulfillments.

What can you do with Fulfillment?

The haravan API lets you do the following with the Fulfillment resource. More detailed versions of these general actions may be available:

Fulfillment Properties

created_at
{ "created_at" : "2012-03-13T16:09:54-04:00" }

The date and time when the fulfillment was created. The API returns this value in ISO 8601 format.

id
{ "id" : 255858046 }

A unique numeric identifier for the fulfillment.

line_items
{ "fulfillable_quantity" : 1 }
{ "fulfillment_service" : "manual" }
{ "fulfillment_status" : "null" }
{ "grams" : 200 }
{ "id" : 466157049 }
{ "price" : "199.00" }
{ "product_id" : 632910392 }
{ "quantity" : 1 }
{ "requires_shipping" : true }
{ "sku" : "IPOD2008GREEN" }
{ "title" : "IPod Nano - 8gb" }
{ "variant_id" : "39072856" }
{ "variant_title" : "green" }
{ "vendor" : "null" }
{ "name" : "IPod Nano - 8gb - green" }
{ "variant_inventory_management" : "haravan" }
{ "properties" : "[ ]" }
{ "product_exists" : "true" }


A historical record of each item in the fulfillment:

  • fulfillable_quantity: The amount available to fulfill. This is the quantity - max(refunded_quantity, fulfilled_quantity) - pending_fulfilled_quantity.
  • fulfillment_service: Service provider who is doing the fulfillment. Valid values are: manual,
  • fulfillment_status: Status of an order in terms of the line_items being fulfilled. Valid values are: fulfilled, null or partial.
  • grams: The weight of the item in grams.
  • id: The id of the line_item within the fulfillment.
  • price: The price of the item.
  • product_id: The unique numeric identifier for the product in the fulfillment.
  • quantity: The number of items in the fulfillment.
  • requires_shipping: Specifies whether or not a customer needs to provide a shipping address when placing an order for this product variant. Valid values are: "true" or "false."
  • sku: A unique identifier of the item in the fulfillment.
  • title: The title of the product.
  • variant_id: The id of the product variant being fulfilled.
  • variant_title: The title of the product variant being fulfilled.
  • vendor: The name of the supplier of the item.
  • name: The name of the product variant.
  • variant_inventory_management: Returns the name of the inventory management system.
  • properties: Returns additional properties associated with the line item.
  • product_exists: States whether or not the product exists. Valid values are "true" or "false".


order_id
{ "order_id" : 450789469 }

The unique numeric identifier for the order.

receipt
{ "testcase" : "true" }
{ "authorization" : "123456" }


Text field that provides information about the receipt:

  • testcase: States whether or not the fulfillment was a testcase. Valid values are "true" or "false".
  • authorization: The authorization code.


status
{ "status" : "failure" }


The status of the fulfillment. Valid values are:

  • pending: The fulfillment is pending.
  • success: The fulfillment was successful.
  • cancelled: The fulfillment was cancelled.
  • error: There was an error with the fulfillment request.
  • failure: The fulfillment request failed.


tracking_company
{ "tracking_company" : "null" }

The name of the shipping company.

tracking_numbers
{ "tracking_numbers" : ["1Z2345"] }

A list of shipping numbers, provided by the shipping company.

tracking_urls
{ "tracking_urls" : ["http://www.google.com/search?q=1Z2345"] }

The URLs to track the fulfillment.

updated_at
{ "updated_at" : "2012-05-01T14:22:25-04:00" }

The date and time when the fulfillment was last modified. The API returns this value in ISO 8601 format.

variant_inventory_management
{ "variant_inventory_management" : "haravan" }

States the name of the inventory management service.

Endpoints

GET/admin/orders/450789469/fulfillments.json
limit

Amount of results

(default: 50) (maximum: 250)
page

Page to show

(default: 1)
since_id

Restrict results to after the specified ID

created_at_min

Show fulfillments created after date (format: 2008-12-31 03:00)

created_at_max

Show fulfillments created before date (format: 2008-12-31 03:00)

updated_at_min

Show fulfillments last updated after date (format: 2008-12-31 03:00)

updated_at_max

Show fulfillments last updated before date (format: 2008-12-31 03:00)

fields

comma-separated list of fields to include in the response

Get a list of all fulfillments for an order.

GET /admin/orders/#{id}/fulfillments.json
View Response
HTTP/1.1 200 OK
{
  "fulfillments": [
    {
      "created_at": "2015-03-28T13:29:45-04:00",
      "id": 255858046,
      "order_id": 450789469,
      "service": "manual",
      "status": "failure",
      "tracking_company": null,
      "updated_at": "2015-03-28T13:29:45-04:00",
      "tracking_number": "1Z2345",
      "tracking_numbers": [
        "1Z2345"
      ],
      "tracking_url": "http:\/\/wwwapps.ups.com\/etracking\/tracking.cgi?InquiryNumber1=1Z2345&TypeOfInquiryNumber=T&AcceptUPSLicenseAgreement=yes&submit=Track",
      "tracking_urls": [
        "http:\/\/wwwapps.ups.com\/etracking\/tracking.cgi?InquiryNumber1=1Z2345&TypeOfInquiryNumber=T&AcceptUPSLicenseAgreement=yes&submit=Track"
      ],
      "receipt": {
        "testcase": true,
        "authorization": "123456"
      },
      "line_items": [
        {
          "fulfillment_service": "manual",
          "fulfillment_status": null,
          "gift_card": false,
          "grams": 200,
          "id": 466157049,
          "price": "199.00",
          "product_id": 632910392,
          "quantity": 1,
          "requires_shipping": true,
          "sku": "IPOD2008GREEN",
          "taxable": true,
          "title": "IPod Nano - 8gb",
          "variant_id": 39072856,
          "variant_title": "green",
          "vendor": null,
          "name": "IPod Nano - 8gb - green",
          "variant_inventory_management": "haravan",
          "properties": [
            {
              "name": "Custom Engraving Front",
              "value": "Happy Birthday"
            },
            {
              "name": "Custom Engraving Back",
              "value": "Merry Christmas"
            }
          ],
          "product_exists": true,
          "fulfillable_quantity": 1,
          "total_discount": "0.00",
          "tax_lines": [
          ]
        }
      ]
    }
  ]
}

Get all fulfillments after the specified ID

GET /admin/orders/#{id}/fulfillments.json?since_id=255858046
View Response
HTTP/1.1 200 OK
{
  "fulfillments": [
    {
      "created_at": "2015-03-28T13:30:04-04:00",
      "id": 1022782891,
      "order_id": 450789469,
      "service": "manual",
      "status": "success",
      "tracking_company": "Other",
      "updated_at": "2015-03-28T13:30:04-04:00",
      "tracking_number": "123456789",
      "tracking_numbers": [
        "123456789"
      ],
      "tracking_url": "http:\/\/www.google.com\/search?q=123456789",
      "tracking_urls": [
        "http:\/\/www.google.com\/search?q=123456789"
      ],
      "receipt": {},
      "line_items": [
        {
          "fulfillment_service": "manual",
          "fulfillment_status": "fulfilled",
          "gift_card": false,
          "grams": 200,
          "id": 466157049,
          "price": "199.00",
          "product_id": 632910392,
          "quantity": 1,
          "requires_shipping": true,
          "sku": "IPOD2008GREEN",
          "taxable": true,
          "title": "IPod Nano - 8gb",
          "variant_id": 39072856,
          "variant_title": "green",
          "vendor": null,
          "name": "IPod Nano - 8gb - green",
          "variant_inventory_management": "haravan",
          "properties": [
            {
              "name": "Custom Engraving Front",
              "value": "Happy Birthday"
            },
            {
              "name": "Custom Engraving Back",
              "value": "Merry Christmas"
            }
          ],
          "product_exists": true,
          "fulfillable_quantity": 0,
          "total_discount": "0.00",
          "tax_lines": [
          ]
        },
        {
          "fulfillment_service": "manual",
          "fulfillment_status": "fulfilled",
          "gift_card": false,
          "grams": 200,
          "id": 518995019,
          "price": "199.00",
          "product_id": 632910392,
          "quantity": 1,
          "requires_shipping": true,
          "sku": "IPOD2008RED",
          "taxable": true,
          "title": "IPod Nano - 8gb",
          "variant_id": 49148385,
          "variant_title": "red",
          "vendor": null,
          "name": "IPod Nano - 8gb - red",
          "variant_inventory_management": "haravan",
          "properties": [
          ],
          "product_exists": true,
          "fulfillable_quantity": 0,
          "total_discount": "0.00",
          "tax_lines": [
          ]
        },
        {
          "fulfillment_service": "manual",
          "fulfillment_status": "fulfilled",
          "gift_card": false,
          "grams": 200,
          "id": 703073504,
          "price": "199.00",
          "product_id": 632910392,
          "quantity": 1,
          "requires_shipping": true,
          "sku": "IPOD2008BLACK",
          "taxable": true,
          "title": "IPod Nano - 8gb",
          "variant_id": 457924702,
          "variant_title": "black",
          "vendor": null,
          "name": "IPod Nano - 8gb - black",
          "variant_inventory_management": "haravan",
          "properties": [
          ],
          "product_exists": true,
          "fulfillable_quantity": 0,
          "total_discount": "0.00",
          "tax_lines": [
          ]
        }
      ]
    }
  ]
}
GET/admin/orders/450789469/fulfillments/count.json
created_at_min

Count fulfillments created after date (format: 2008-12-31 03:00)

created_at_max

Count fulfillments created before date (format: 2008-12-31 03:00)

updated_at_min

Count fulfillments last updated after date (format: 2008-12-31 03:00)

updated_at_max

Count fulfillments last updated before date (format: 2008-12-31 03:00)

Count all the total number of fulfillments for an order.

GET /admin/orders/#{id}/fulfillments/count.json
View Response
HTTP/1.1 200 OK
{
  "count": 1
}
GET/admin/orders/450789469/fulfillments/255858046.json
fields

comma-separated list of fields to include in the response

Get the Representation of a specific fulfillment.

GET /admin/orders/#{id}/fulfillments/#{id}.json
View Response
HTTP/1.1 200 OK
{
  "fulfillment": {
    "created_at": "2015-03-28T13:29:45-04:00",
    "id": 255858046,
    "order_id": 450789469,
    "service": "manual",
    "status": "failure",
    "tracking_company": null,
    "updated_at": "2015-03-28T13:29:45-04:00",
    "tracking_number": "1Z2345",
    "tracking_numbers": [
      "1Z2345"
    ],
    "tracking_url": "http:\/\/wwwapps.ups.com\/etracking\/tracking.cgi?InquiryNumber1=1Z2345&TypeOfInquiryNumber=T&AcceptUPSLicenseAgreement=yes&submit=Track",
    "tracking_urls": [
      "http:\/\/wwwapps.ups.com\/etracking\/tracking.cgi?InquiryNumber1=1Z2345&TypeOfInquiryNumber=T&AcceptUPSLicenseAgreement=yes&submit=Track"
    ],
    "receipt": {
      "testcase": true,
      "authorization": "123456"
    },
    "line_items": [
      {
        "fulfillment_service": "manual",
        "fulfillment_status": null,
        "gift_card": false,
        "grams": 200,
        "id": 466157049,
        "price": "199.00",
        "product_id": 632910392,
        "quantity": 1,
        "requires_shipping": true,
        "sku": "IPOD2008GREEN",
        "taxable": true,
        "title": "IPod Nano - 8gb",
        "variant_id": 39072856,
        "variant_title": "green",
        "vendor": null,
        "name": "IPod Nano - 8gb - green",
        "variant_inventory_management": "haravan",
        "properties": [
          {
            "name": "Custom Engraving Front",
            "value": "Happy Birthday"
          },
          {
            "name": "Custom Engraving Back",
            "value": "Merry Christmas"
          }
        ],
        "product_exists": true,
        "fulfillable_quantity": 1,
        "total_discount": "0.00",
        "tax_lines": [
        ]
      }
    ]
  }
}
POST/admin/orders/450789469/fulfillments.json

Creates a fulfillment for the specified order and line items. If the line items in the fulfillment use a manual or custom fulfillment service the status of the returned fulfillment will be set immediately. If the line items use an external fulfillment service they will be queued for fulfillment and the status will be set to pending until the external fulfillment service has been invoked. Not specifying line item IDs causes all unfulfilled and partially fulfilled line items for the order to be fulfilled. Note that all line items being fulfilled must have the same fulfillment service.


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

POST /admin/orders/#{id}/fulfillments.json
{
  "fulfillment": {
    "tracking_number": "123456789",
    "notify_customer": true
  }
}
View Response
HTTP/1.1 201 Created
{
  "fulfillment": {
    "created_at": "2015-03-28T13:30:01-04:00",
    "id": 1022782885,
    "order_id": 450789469,
    "service": "manual",
    "status": "success",
    "tracking_company": "Other",
    "updated_at": "2015-03-28T13:30:01-04:00",
    "tracking_number": "123456789",
    "tracking_numbers": [
      "123456789"
    ],
    "tracking_url": "http:\/\/www.google.com\/search?q=123456789",
    "tracking_urls": [
      "http:\/\/www.google.com\/search?q=123456789"
    ],
    "receipt": {},
    "line_items": [
      {
        "fulfillment_service": "manual",
        "fulfillment_status": "fulfilled",
        "gift_card": false,
        "grams": 200,
        "id": 466157049,
        "price": "199.00",
        "product_id": 632910392,
        "quantity": 1,
        "requires_shipping": true,
        "sku": "IPOD2008GREEN",
        "taxable": true,
        "title": "IPod Nano - 8gb",
        "variant_id": 39072856,
        "variant_title": "green",
        "vendor": null,
        "name": "IPod Nano - 8gb - green",
        "variant_inventory_management": "haravan",
        "properties": [
          {
            "name": "Custom Engraving Front",
            "value": "Happy Birthday"
          },
          {
            "name": "Custom Engraving Back",
            "value": "Merry Christmas"
          }
        ],
        "product_exists": true,
        "fulfillable_quantity": 0,
        "total_discount": "0.00",
        "tax_lines": [
        ]
      },
      {
        "fulfillment_service": "manual",
        "fulfillment_status": "fulfilled",
        "gift_card": false,
        "grams": 200,
        "id": 518995019,
        "price": "199.00",
        "product_id": 632910392,
        "quantity": 1,
        "requires_shipping": true,
        "sku": "IPOD2008RED",
        "taxable": true,
        "title": "IPod Nano - 8gb",
        "variant_id": 49148385,
        "variant_title": "red",
        "vendor": null,
        "name": "IPod Nano - 8gb - red",
        "variant_inventory_management": "haravan",
        "properties": [
        ],
        "product_exists": true,
        "fulfillable_quantity": 0,
        "total_discount": "0.00",
        "tax_lines": [
        ]
      },
      {
        "fulfillment_service": "manual",
        "fulfillment_status": "fulfilled",
        "gift_card": false,
        "grams": 200,
        "id": 703073504,
        "price": "199.00",
        "product_id": 632910392,
        "quantity": 1,
        "requires_shipping": true,
        "sku": "IPOD2008BLACK",
        "taxable": true,
        "title": "IPod Nano - 8gb",
        "variant_id": 457924702,
        "variant_title": "black",
        "vendor": null,
        "name": "IPod Nano - 8gb - black",
        "variant_inventory_management": "haravan",
        "properties": [
        ],
        "product_exists": true,
        "fulfillable_quantity": 0,
        "total_discount": "0.00",
        "tax_lines": [
        ]
      }
    ]
  }
}

Fulfill line items without a tracking number

POST /admin/orders/#{id}/fulfillments.json
{
  "fulfillment": {
    "tracking_number": null,
    "line_items": [
      {
        "id": 466157049
      },
      {
        "id": 518995019
      },
      {
        "id": 703073504
      }
    ]
  }
}
View Response
HTTP/1.1 201 Created
{
  "fulfillment": {
    "created_at": "2015-03-28T13:30:02-04:00",
    "id": 1022782886,
    "order_id": 450789469,
    "service": "manual",
    "status": "success",
    "tracking_company": null,
    "updated_at": "2015-03-28T13:30:02-04:00",
    "tracking_number": null,
    "tracking_numbers": [
    ],
    "tracking_url": null,
    "tracking_urls": [
    ],
    "receipt": {},
    "line_items": [
      {
        "fulfillment_service": "manual",
        "fulfillment_status": "fulfilled",
        "gift_card": false,
        "grams": 200,
        "id": 466157049,
        "price": "199.00",
        "product_id": 632910392,
        "quantity": 1,
        "requires_shipping": true,
        "sku": "IPOD2008GREEN",
        "taxable": true,
        "title": "IPod Nano - 8gb",
        "variant_id": 39072856,
        "variant_title": "green",
        "vendor": null,
        "name": "IPod Nano - 8gb - green",
        "variant_inventory_management": "haravan",
        "properties": [
          {
            "name": "Custom Engraving Front",
            "value": "Happy Birthday"
          },
          {
            "name": "Custom Engraving Back",
            "value": "Merry Christmas"
          }
        ],
        "product_exists": true,
        "fulfillable_quantity": 0,
        "total_discount": "0.00",
        "tax_lines": [
        ]
      },
      {
        "fulfillment_service": "manual",
        "fulfillment_status": "fulfilled",
        "gift_card": false,
        "grams": 200,
        "id": 518995019,
        "price": "199.00",
        "product_id": 632910392,
        "quantity": 1,
        "requires_shipping": true,
        "sku": "IPOD2008RED",
        "taxable": true,
        "title": "IPod Nano - 8gb",
        "variant_id": 49148385,
        "variant_title": "red",
        "vendor": null,
        "name": "IPod Nano - 8gb - red",
        "variant_inventory_management": "haravan",
        "properties": [
        ],
        "product_exists": true,
        "fulfillable_quantity": 0,
        "total_discount": "0.00",
        "tax_lines": [
        ]
      },
      {
        "fulfillment_service": "manual",
        "fulfillment_status": "fulfilled",
        "gift_card": false,
        "grams": 200,
        "id": 703073504,
        "price": "199.00",
        "product_id": 632910392,
        "quantity": 1,
        "requires_shipping": true,
        "sku": "IPOD2008BLACK",
        "taxable": true,
        "title": "IPod Nano - 8gb",
        "variant_id": 457924702,
        "variant_title": "black",
        "vendor": null,
        "name": "IPod Nano - 8gb - black",
        "variant_inventory_management": "haravan",
        "properties": [
        ],
        "product_exists": true,
        "fulfillable_quantity": 0,
        "total_discount": "0.00",
        "tax_lines": [
        ]
      }
    ]
  }
}

Fulfill all line items for an order with multiple tracking numbers

POST /admin/orders/#{id}/fulfillments.json
{
  "fulfillment": {
    "tracking_numbers": [
      "5cb77fe0c6e5259ccc892d18cda76dc8",
      "ff203e9faaba44633df180ab0220d9ff",
      "342430f9cc3e85580e298fce20050324"
    ],
    "line_items": [
      {
        "id": 466157049
      },
      {
        "id": 518995019
      },
      {
        "id": 703073504
      }
    ]
  }
}
View Response
HTTP/1.1 201 Created
{
  "fulfillment": {
    "created_at": "2015-03-28T13:30:02-04:00",
    "id": 1022782887,
    "order_id": 450789469,
    "service": "manual",
    "status": "success",
    "tracking_company": "Other",
    "updated_at": "2015-03-28T13:30:02-04:00",
    "tracking_number": "5cb77fe0c6e5259ccc892d18cda76dc8",
    "tracking_numbers": [
      "5cb77fe0c6e5259ccc892d18cda76dc8",
      "ff203e9faaba44633df180ab0220d9ff",
      "342430f9cc3e85580e298fce20050324"
    ],
    "tracking_url": "http:\/\/www.google.com\/search?q=5cb77fe0c6e5259ccc892d18cda76dc8",
    "tracking_urls": [
      "http:\/\/www.google.com\/search?q=5cb77fe0c6e5259ccc892d18cda76dc8",
      "http:\/\/www.google.com\/search?q=ff203e9faaba44633df180ab0220d9ff",
      "http:\/\/www.google.com\/search?q=342430f9cc3e85580e298fce20050324"
    ],
    "receipt": {},
    "line_items": [
      {
        "fulfillment_service": "manual",
        "fulfillment_status": "fulfilled",
        "gift_card": false,
        "grams": 200,
        "id": 466157049,
        "price": "199.00",
        "product_id": 632910392,
        "quantity": 1,
        "requires_shipping": true,
        "sku": "IPOD2008GREEN",
        "taxable": true,
        "title": "IPod Nano - 8gb",
        "variant_id": 39072856,
        "variant_title": "green",
        "vendor": null,
        "name": "IPod Nano - 8gb - green",
        "variant_inventory_management": "haravan",
        "properties": [
          {
            "name": "Custom Engraving Front",
            "value": "Happy Birthday"
          },
          {
            "name": "Custom Engraving Back",
            "value": "Merry Christmas"
          }
        ],
        "product_exists": true,
        "fulfillable_quantity": 0,
        "total_discount": "0.00",
        "tax_lines": [
        ]
      },
      {
        "fulfillment_service": "manual",
        "fulfillment_status": "fulfilled",
        "gift_card": false,
        "grams": 200,
        "id": 518995019,
        "price": "199.00",
        "product_id": 632910392,
        "quantity": 1,
        "requires_shipping": true,
        "sku": "IPOD2008RED",
        "taxable": true,
        "title": "IPod Nano - 8gb",
        "variant_id": 49148385,
        "variant_title": "red",
        "vendor": null,
        "name": "IPod Nano - 8gb - red",
        "variant_inventory_management": "haravan",
        "properties": [
        ],
        "product_exists": true,
        "fulfillable_quantity": 0,
        "total_discount": "0.00",
        "tax_lines": [
        ]
      },
      {
        "fulfillment_service": "manual",
        "fulfillment_status": "fulfilled",
        "gift_card": false,
        "grams": 200,
        "id": 703073504,
        "price": "199.00",
        "product_id": 632910392,
        "quantity": 1,
        "requires_shipping": true,
        "sku": "IPOD2008BLACK",
        "taxable": true,
        "title": "IPod Nano - 8gb",
        "variant_id": 457924702,
        "variant_title": "black",
        "vendor": null,
        "name": "IPod Nano - 8gb - black",
        "variant_inventory_management": "haravan",
        "properties": [
        ],
        "product_exists": true,
        "fulfillable_quantity": 0,
        "total_discount": "0.00",
        "tax_lines": [
        ]
      }
    ]
  }
}

Fulfill all line items for an order and and use a custom tracking url and company

POST /admin/orders/#{id}/fulfillments.json
{
  "fulfillment": {
    "tracking_url": "http:\/\/www.packagetrackr.com\/track\/somecarrier\/1234567",
    "tracking_company": "Jack Black's Pack, Stack and Track",
    "line_items": [
      {
        "id": 466157049
      },
      {
        "id": 518995019
      },
      {
        "id": 703073504
      }
    ]
  }
}
View Response
HTTP/1.1 201 Created
{
  "fulfillment": {
    "created_at": "2015-03-28T13:30:02-04:00",
    "id": 1022782888,
    "order_id": 450789469,
    "service": "manual",
    "status": "success",
    "tracking_company": "Jack Black's Pack, Stack and Track",
    "updated_at": "2015-03-28T13:30:02-04:00",
    "tracking_number": null,
    "tracking_numbers": [
    ],
    "tracking_url": "http:\/\/www.packagetrackr.com\/track\/somecarrier\/1234567",
    "tracking_urls": [
      "http:\/\/www.packagetrackr.com\/track\/somecarrier\/1234567"
    ],
    "receipt": {},
    "line_items": [
      {
        "fulfillment_service": "manual",
        "fulfillment_status": "fulfilled",
        "gift_card": false,
        "grams": 200,
        "id": 466157049,
        "price": "199.00",
        "product_id": 632910392,
        "quantity": 1,
        "requires_shipping": true,
        "sku": "IPOD2008GREEN",
        "taxable": true,
        "title": "IPod Nano - 8gb",
        "variant_id": 39072856,
        "variant_title": "green",
        "vendor": null,
        "name": "IPod Nano - 8gb - green",
        "variant_inventory_management": "haravan",
        "properties": [
          {
            "name": "Custom Engraving Front",
            "value": "Happy Birthday"
          },
          {
            "name": "Custom Engraving Back",
            "value": "Merry Christmas"
          }
        ],
        "product_exists": true,
        "fulfillable_quantity": 0,
        "total_discount": "0.00",
        "tax_lines": [
        ]
      },
      {
        "fulfillment_service": "manual",
        "fulfillment_status": "fulfilled",
        "gift_card": false,
        "grams": 200,
        "id": 518995019,
        "price": "199.00",
        "product_id": 632910392,
        "quantity": 1,
        "requires_shipping": true,
        "sku": "IPOD2008RED",
        "taxable": true,
        "title": "IPod Nano - 8gb",
        "variant_id": 49148385,
        "variant_title": "red",
        "vendor": null,
        "name": "IPod Nano - 8gb - red",
        "variant_inventory_management": "haravan",
        "properties": [
        ],
        "product_exists": true,
        "fulfillable_quantity": 0,
        "total_discount": "0.00",
        "tax_lines": [
        ]
      },
      {
        "fulfillment_service": "manual",
        "fulfillment_status": "fulfilled",
        "gift_card": false,
        "grams": 200,
        "id": 703073504,
        "price": "199.00",
        "product_id": 632910392,
        "quantity": 1,
        "requires_shipping": true,
        "sku": "IPOD2008BLACK",
        "taxable": true,
        "title": "IPod Nano - 8gb",
        "variant_id": 457924702,
        "variant_title": "black",
        "vendor": null,
        "name": "IPod Nano - 8gb - black",
        "variant_inventory_management": "haravan",
        "properties": [
        ],
        "product_exists": true,
        "fulfillable_quantity": 0,
        "total_discount": "0.00",
        "tax_lines": [
        ]
      }
    ]
  }
}

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

POST /admin/orders/#{id}/fulfillments.json
{
  "fulfillment": {
    "tracking_number": null,
    "line_items": [
      {
        "id": 466157049
      }
    ]
  }
}
View Response
HTTP/1.1 201 Created
{
  "fulfillment": {
    "created_at": "2015-03-28T13:30:03-04:00",
    "id": 1022782889,
    "order_id": 450789469,
    "service": "manual",
    "status": "success",
    "tracking_company": null,
    "updated_at": "2015-03-28T13:30:03-04:00",
    "tracking_number": null,
    "tracking_numbers": [
    ],
    "tracking_url": null,
    "tracking_urls": [
    ],
    "receipt": {},
    "line_items": [
      {
        "fulfillment_service": "manual",
        "fulfillment_status": "fulfilled",
        "gift_card": false,
        "grams": 200,
        "id": 466157049,
        "price": "199.00",
        "product_id": 632910392,
        "quantity": 1,
        "requires_shipping": true,
        "sku": "IPOD2008GREEN",
        "taxable": true,
        "title": "IPod Nano - 8gb",
        "variant_id": 39072856,
        "variant_title": "green",
        "vendor": null,
        "name": "IPod Nano - 8gb - green",
        "variant_inventory_management": "haravan",
        "properties": [
          {
            "name": "Custom Engraving Front",
            "value": "Happy Birthday"
          },
          {
            "name": "Custom Engraving Back",
            "value": "Merry Christmas"
          }
        ],
        "product_exists": true,
        "fulfillable_quantity": 0,
        "total_discount": "0.00",
        "tax_lines": [
        ]
      }
    ]
  }
}

Partially fulfill a single line item by explicitly specifying the line item and quantity to be fulfilled.

POST /admin/orders/#{id}/fulfillments.json
{
  "fulfillment": {
    "tracking_number": null,
    "line_items": [
      {
        "id": 466157049,
        "quantity": 1
      }
    ]
  }
}
View Response
HTTP/1.1 201 Created
{
  "fulfillment": {
    "created_at": "2015-03-28T13:30:03-04:00",
    "id": 1022782890,
    "order_id": 450789469,
    "service": "manual",
    "status": "success",
    "tracking_company": null,
    "updated_at": "2015-03-28T13:30:03-04:00",
    "tracking_number": null,
    "tracking_numbers": [
    ],
    "tracking_url": null,
    "tracking_urls": [
    ],
    "receipt": {},
    "line_items": [
      {
        "fulfillment_service": "manual",
        "fulfillment_status": "partial",
        "gift_card": false,
        "grams": 200,
        "id": 466157049,
        "price": "199.00",
        "product_id": 632910392,
        "quantity": 1,
        "requires_shipping": true,
        "sku": "IPOD2008GREEN",
        "taxable": true,
        "title": "IPod Nano - 8gb",
        "variant_id": 39072856,
        "variant_title": "green",
        "vendor": null,
        "name": "IPod Nano - 8gb - green",
        "variant_inventory_management": "haravan",
        "properties": [
          {
            "name": "Custom Engraving Front",
            "value": "Happy Birthday"
          },
          {
            "name": "Custom Engraving Back",
            "value": "Merry Christmas"
          }
        ],
        "product_exists": true,
        "fulfillable_quantity": 1,
        "total_discount": "0.00",
        "tax_lines": [
        ]
      }
    ]
  }
}
PUT/admin/orders/450789469/fulfillments/255858046.json

Update tracking number for a fulfillment.

PUT /admin/orders/#{id}/fulfillments/#{id}.json
{
  "fulfillment": {
    "tracking_number": "987654321",
    "id": 255858046
  }
}
View Response
HTTP/1.1 200 OK
{
  "fulfillment": {
    "created_at": "2015-03-28T13:29:45-04:00",
    "id": 255858046,
    "order_id": 450789469,
    "service": "manual",
    "status": "failure",
    "tracking_company": "Other",
    "updated_at": "2015-03-28T13:30:05-04:00",
    "tracking_number": "987654321",
    "tracking_numbers": [
      "987654321"
    ],
    "tracking_url": "http:\/\/www.google.com\/search?q=987654321",
    "tracking_urls": [
      "http:\/\/www.google.com\/search?q=987654321"
    ],
    "receipt": {
      "testcase": true,
      "authorization": "123456"
    },
    "line_items": [
      {
        "fulfillment_service": "manual",
        "fulfillment_status": null,
        "gift_card": false,
        "grams": 200,
        "id": 466157049,
        "price": "199.00",
        "product_id": 632910392,
        "quantity": 1,
        "requires_shipping": true,
        "sku": "IPOD2008GREEN",
        "taxable": true,
        "title": "IPod Nano - 8gb",
        "variant_id": 39072856,
        "variant_title": "green",
        "vendor": null,
        "name": "IPod Nano - 8gb - green",
        "variant_inventory_management": "haravan",
        "properties": [
          {
            "name": "Custom Engraving Front",
            "value": "Happy Birthday"
          },
          {
            "name": "Custom Engraving Back",
            "value": "Merry Christmas"
          }
        ],
        "product_exists": true,
        "fulfillable_quantity": 0,
        "total_discount": "0.00",
        "tax_lines": [
        ]
      }
    ]
  }
}
POST/admin/orders/450789469/fulfillments/255858046/complete.json

Complete a pending fulfillment.

POST /admin/orders/#{id}/fulfillments/#{id}/complete.json
{}
View Response
HTTP/1.1 201 Created
{
  "fulfillment": {
    "created_at": "2015-03-28T13:29:45-04:00",
    "id": 255858046,
    "order_id": 450789469,
    "service": "manual",
    "status": "success",
    "tracking_company": "UPS",
    "updated_at": "2015-03-28T13:30:00-04:00",
    "tracking_number": "1Z2345",
    "tracking_numbers": [
      "1Z2345"
    ],
    "tracking_url": "http:\/\/wwwapps.ups.com\/etracking\/tracking.cgi?InquiryNumber1=1Z2345&TypeOfInquiryNumber=T&AcceptUPSLicenseAgreement=yes&submit=Track",
    "tracking_urls": [
      "http:\/\/wwwapps.ups.com\/etracking\/tracking.cgi?InquiryNumber1=1Z2345&TypeOfInquiryNumber=T&AcceptUPSLicenseAgreement=yes&submit=Track"
    ],
    "receipt": {
      "testcase": true,
      "authorization": "123456"
    },
    "line_items": [
      {
        "fulfillment_service": "manual",
        "fulfillment_status": "fulfilled",
        "gift_card": false,
        "grams": 200,
        "id": 466157049,
        "price": "199.00",
        "product_id": 632910392,
        "quantity": 1,
        "requires_shipping": true,
        "sku": "IPOD2008GREEN",
        "taxable": true,
        "title": "IPod Nano - 8gb",
        "variant_id": 39072856,
        "variant_title": "green",
        "vendor": null,
        "name": "IPod Nano - 8gb - green",
        "variant_inventory_management": "haravan",
        "properties": [
          {
            "name": "Custom Engraving Front",
            "value": "Happy Birthday"
          },
          {
            "name": "Custom Engraving Back",
            "value": "Merry Christmas"
          }
        ],
        "product_exists": true,
        "fulfillable_quantity": 0,
        "total_discount": "0.00",
        "tax_lines": [
        ]
      }
    ]
  }
}
POST/admin/orders/450789469/fulfillments/255858046/cancel.json

Cancel a pending fulfillment.

POST /admin/orders/#{id}/fulfillments/#{id}/cancel.json
{}
View Response
HTTP/1.1 201 Created
{
  "fulfillment": {
    "created_at": "2015-03-28T13:29:45-04:00",
    "id": 255858046,
    "order_id": 450789469,
    "service": "manual",
    "status": "cancelled",
    "tracking_company": "UPS",
    "updated_at": "2015-03-28T13:30:00-04:00",
    "tracking_number": "1Z2345",
    "tracking_numbers": [
      "1Z2345"
    ],
    "tracking_url": "http:\/\/wwwapps.ups.com\/etracking\/tracking.cgi?InquiryNumber1=1Z2345&TypeOfInquiryNumber=T&AcceptUPSLicenseAgreement=yes&submit=Track",
    "tracking_urls": [
      "http:\/\/wwwapps.ups.com\/etracking\/tracking.cgi?InquiryNumber1=1Z2345&TypeOfInquiryNumber=T&AcceptUPSLicenseAgreement=yes&submit=Track"
    ],
    "receipt": {
      "testcase": true,
      "authorization": "123456"
    },
    "line_items": [
      {
        "fulfillment_service": "manual",
        "fulfillment_status": null,
        "gift_card": false,
        "grams": 200,
        "id": 466157049,
        "price": "199.00",
        "product_id": 632910392,
        "quantity": 1,
        "requires_shipping": true,
        "sku": "IPOD2008GREEN",
        "taxable": true,
        "title": "IPod Nano - 8gb",
        "variant_id": 39072856,
        "variant_title": "green",
        "vendor": null,
        "name": "IPod Nano - 8gb - green",
        "variant_inventory_management": "haravan",
        "properties": [
          {
            "name": "Custom Engraving Front",
            "value": "Happy Birthday"
          },
          {
            "name": "Custom Engraving Back",
            "value": "Merry Christmas"
          }
        ],
        "product_exists": true,
        "fulfillable_quantity": 0,
        "total_discount": "0.00",
        "tax_lines": [
        ]
      }
    ]
  }
}

Haravan - Công ty công nghệ cung cấp giải pháp kinh doanh thương mại điện tử, duy nhất tại Việt Nam được Google lựa chọn vào chương trình bệ phóng tiềm năng với hỗ trợ và đào tạo công nghệ để vươn ra thị trường quốc tế vững chắc.