rest will allow you to perform Shopify actions with use of Shopify REST API.

It accepts a JSON object as a parameter.

Here is an example input object that would be used to create fulfillment via REST API.

{% json rest_input %}
    "path": "/orders/1234567/fulfillments.json",
    "method": "POST",
    "body": {
      "fulfillment": {
        "location_id": "98765431",
        "notify_customer": false,
        "status": "success"
{% endjson %}

Above can be used together with rest filter to create fulfillment for order: 1234567.

{% assign fulfillment_result = rest_input | rest %}

fulfillment_result is going to store response returned from shopify. If we want to access newly created fulfillment we would do with with following syntax: fulfillment_result.body.fulfillment

rest input object has one required parameter which is path. You can always look up path for every Shopify resource in official Shopify REST documentation:

Last updated