Fulfillments

(ms.fulfillments)

Fulfillments allow the user to split an order into multiple fulfillments to ship different items (and their varying quantity) independently.



Fields

ValueDescription
fid   
Type: string
The id of the fulfillment.
<p>&nbsp;OID123-F1</p>
oid   
Type: string
OID of the associated order.
status   
Type: string
Status of the fulfillment.
<p>Pending, Shipped, Fulfilled or Cancelled</p>
items   
Type: array
Array of objects containing the details of items in the order.
name
Type: string
variant_id
Type: string
price
Type: string
quantity
Type: string
Quantity of product item.
total
Type: string
item_count   
Type: number
Total number of items in the fulfillment.
sub_total   
Type: number
Sub total amount of the fulfillment.
shipping_charge   
Type: number
Shipping charges applied to the fulfillment.
additional_charge   
Type: number
Additional charges applied to the fulfillment.
discount   
Type: number
tax   
Type: number
total   
Type: number
Total amount of the fulfillment.
tracking_company   
Type: string
Logistics provider used to ship the fulfillment.
service   
Type: string
method   
Type: string
price   
Type: string
Logistics charges applied.
tracking_number   
Type: string
Tracking number of the shipment associated with the fulfillment.
tracking_status   
Type: string
Tracking status of a fulfillment in case it has been shipped, marked as delivered.
shipping_label   
Type: string
Link to shipping label of the shipment.
manifest   
Type: string
Link to manifest of the shipment.
order_id   
Type: string
The record id of the associated orders.
shipment_id   
Type: string
Record id of the shipment associated with the fulfillment (if any).
PickupConfirmationNumber   
Type: string

Commands (Endpoints)

POST /api/1/entity/ms.fulfillments   
Creates a new fulfillment
DEL /api/1/entity/ms.fulfillments/{resource_id}   
Deletes a fulfillment
PUT /api/1/entity/ms.fulfillments/{resource_id}   
Updates an existing fulfillment
GET /api/1/entity/ms.fulfillments/_/generateInvoice   
This command is used to generate the invoice for an order through fulfillments

Examples

Generate Invoice

Request
{
            entity: 'ms.invoices',
            data: {
                invoice_number: "INV-334",
            },
            query: {
                q: {
                    "order_id": "OID5097",
                    "type": "manual",
                    "reset_counter": true,
                    "send_invoice": 1,
                    "selected_template": "5c37319ab0849c5b64234154",
                    "fulfillment_id": "5d53ad8dc7ae55149d11aa34"
                },
            }
        }
Response
{ status: 200,
  data: 
   { invoice_number: 'INV-334',
     template: '<div style="page-break-after: always;"></div>\n<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet">\n<!--<link href="http://cdn.storehippo.com/global/assets/ace.min.css" rel="stylesheet">\n<link rel="stylesheet" href="/css/ace.min.css">-->\n<div ng-if="loading">\n    <i class="fa fa-cog fa-spin fa-5x"></i>\n</div>\n<style>\n    ul {\n        padding-left: 10px;\n    }\n    ul > li {\n        display: inline-block;\n    }\n    .width-48 {\n        width: 49%;\n        vertical-align: middle;\n    }\n    .width-31 {\n        width: 32%;\n        vertical-align: top;\n    }\n    .headings {\n        padding: 3px 0px;\n        font-weight: bold;\n        text-align: left;\n        font-size: 15px;\n    }\n    hr {\n        border: 1px solid #ccc;\n        margin: 20px 0px;\n    }\n</style>\n<div ng-if="!loading">\n    <div class="main-container" id="main-container">\n\n        <div class="row">\n            <div>\n\n                <div style="padding: 25px;">\n                    <!-- ===================LOGO ROW====================-->\n                    <div align="center" >\n                        <span style="font-size: 20px;"><b>Tax Invoice</b></span>\n                    </div>\n                    <hr>\n                    <ul>\n                        <li class="width-48">\n                            <img src=\'http://cdn.storehippo.com/s/57aaca10964eb5eb1362cb19/ms.settings/5256837ccc4abf1d39000001/541bb4ab3fb3a1105c805281.png\' style="width: 180px;"/>\n                            \n                        </li>\n                        <li class="width-48" align="right">\n                            <table style="float: right">\n                                <tr>\n                                    <td align="right"><b>Invoice Number:&nbsp;</b></td>\n                                    <td align="right" style="width: 100px">INV-334</td>\n                                </tr>\n                                <tr>\n                                    <td align="right"><b>Order Number:&nbsp;</b></td>\n                                    <td align="right" style="width: 100px">OID5097</td>\n                                </tr>\n                                <tr>\n                                    <td align="right"><b>Order Date:&nbsp;</b></td>\n                                    <td align="right" style="width: 100px">14 AUG, 2019</td>\n                                </tr>\n                            </table>\n                        </li>\n                    </ul>\n                    <hr>\n                    <!-- ===================END LOGO ROW====================-->\n\n\n                    <!-- ===================DETAILS ROW====================-->\n                    <ul>\n                        <li class="width-31">\n                            <span class="headings">SOLD BY</span><br>\n                            <span><b>Store Title</b></span><br>\n                            <span>Office No. 239  Building Name-4 Street Name - Spaze</span><br>\n                            <span>Delhi - 110085</span><br>\n                            <span>Haryana | IN</span>                            \n                        </li>\n                        <li class="width-31">\n                            <span class="headings">BILLING ADDRESS </span><br>\n                            <span><b>Testing</b></span><br>\n                            <span>B4-309 Spaze iTech Park, Sector-49, Sohna Road</span><br>\n                            <span>Gurgaon - 122001</span><br>\n                            <span>Harayana | IN</span><br>\n                            <span> Phone: 1234567890</span>\n                        </li>\n                        <li class="width-31">\n                            <span class="headings">SHIPPING ADDRESS</span><br>\n                            <span><b>Testing</b></span><br>\n                            <span>B4-309 Spaze iTech Park, Sector-49, Sohna Road</span><br>\n                            <span>Gurgaon - 122001</span><br>\n                            <span>Harayana | IN</span><br>\n                            <span> Phone: 1234567890</span>\n                        </li>\n                    </ul>\n                    <hr>\n                    <div  style="margin: 0px;padding: 0px">\n                        <div  style="padding-left:0px">\n                            <table class="table table-striped table-bordered" style="margin-bottom:0px!important;font-size:14px">\n                                <thead>\n                                <tr>\n                                    <td rowspan="2" style="width:240px;"><b>Product</b></td>\n                                    <td rowspan="2" style="width:140px;" align="center"><b>Unit Price</b></td>\n                                    <td rowspan="2" style="width:30px;" align="center"><b>Qty</b></td>\n                                    <td rowspan="2" style="width:90px;;" align="center"><b>Taxable Amount</b></td>\n                                    <td colspan="3" style="width:190px;" align="center"><b>Tax</b></td>\n                                    <td rowspan="2" style="width:90px;" align="center"><b>Total</b></td>\n                                </tr>\n                                <tr>\n                                    <td style="width:50px;">Name</td>\n                                    <td style="width:50px;">Rate</td>\n                                    <td style="width:90px;" class="text-right">Amount</td>\n                                </tr>\n                                </thead>\n                                <tbody> \n                                <tr  style="font-size: 12px;">\n                                    <td style="width:240px;">shirt  \n                                        \n                                        \n\n                                    </td>\n                                    <td style="width:140px;" class="text-right"><span >&#8377; 100.0</span>\n                                        \n                                    </td>\n                                    <td style="width:30px;" class="text-right">1</td>\n                                    <td style="width:90px;"  class="text-right">&#8377; 100.0</td>\n                                    <td style="width:50px;">  \n                                    </td>\n                                    <td style="width:50px;"> \n                                    </td>\n                                    <td style="width:90px;"  class="text-right">  \n                                    </td>\n                                    <!--                                        <td>&#8377; 100.0</td>                                        -->\n                                    <td style="width:90px;" class="text-right">&#8377; 100.0</td>\n                                </tr>\n                                                                 <!---->\n                                <tr style="font-size: 12px;">\n                                    <td colspan="7" class="text-right">Sub Total</td>\n                                    <td class="text-right">&#8377; 100.0</td>\n                                </tr>\n    \n                                <tr style="font-size: 12px;">                                 </tr>\n                                <!-- <tr>                                         <td colspan="7" class="text-right">Sub Total</td>                                         <td>100</td>                                     </tr>-->\n                                <!--   <tr ng-if="order.taxes_total">                                           <td colspan="7" class="text-right">Total Tax</td>                                           <td colspan="1">                                               <span>0</span>                                           </td>                                       </tr>-->\n                                <!-- <tr ng-if="order.shipping_metdod">                                         <td colspan="7" class="text-right">Shipping Charges(+)</td>                                         <td>0</td>                                     </tr>-->\n                                 <tr style="font-size: 12px;">\n                                    <td colspan="7" class="text-right"><b>Total</b></td>\n                                    <td class="text-right">&#8377; 100.0</td>\n                                </tr>\n                                </tbody>\n                            </table>\n                        </div>\n                    </div>\n                </div>\n                <!-- ===================END TABLE ROW====================-->\n            </div>\n        </div>\n    </div>\n</div>',
     invoice_pdf: '//cdn.storehippo.com/s/57aaca10964eb5eb1362cb19/ms.invoices/5d53ad90c7ae55149d11aae9/invoice-INV-334.pdf' },
  messages: 
   [ { name: 'ms.entity.invoices.generateInvoice',
       level: 'success',
       key: 'ms.entity.invoices.generateInvoice' } ] }
GET /api/1/entity/ms.fulfillments/{resource_id}   
Retrieves a single fulfillment
GET /api/1/entity/ms.fulfillments   
Retrieves a list of fulfillments