Webhooks
Introduction
Webhooks allow your application to receive information about certain events as they occur and respond in a way that you specify, either by triggering any relevant actions or updating data inside your application.
Configuration
- To access the Stores page, log in to your merchOne account and navigate to the dashboard 
- Navigate to the Stores page and access the Settings for the specific store where you wish to add a webhook. 
- Scroll to the Webhook section 
- Add the webhook URL to the Webhook URL field 
- Click Save 
Get notified via Webhook
After completing the steps above, you will receive a notification to the specified Webhook URL.
When the order is fulfilled, merchOne sends a POST request in aJSONformat with the following information:
{
  "type": "shipment_sent",
  "created": {
    "date": "2018-05-30 08:40:20.050308",
    "timezone_type": 3,
    "timezone": "UTC"
  },
  "data": {
    "shipment": {
      "shipping_method": {
        "code": "UPS MIEXP",
        "name": "UPS MIEXP"
      },
      "tracking_number": "",
      "tracking_url": "",
      "shipped_at": {
        "date": "2018-05-29 15:42:37.000000",
        "timezone_type": 3,
        "timezone": "UTC"
      },
      "items": [
        {
          "item_id": 5443,
          "quantity": 1
        }
      ]
    },
    "order": {
      "id": "PPO26149838T",
      "external_id": null,
      "is_test": true,
      "shipping_method": {
        "code": "UPS MIEXP",
        "name": "UPS MIEXP"
      },
      "status": "FULFILLED",
      "status_label": "Fulfilled (TEST)",
      "created_at": {
        "date": "2018-05-29 14:14:52.000000",
        "timezone_type": 3,
        "timezone": "UTC"
      },
      "updated_at": {
        "date": "2018-05-29 15:42:37.000000",
        "timezone_type": 3,
        "timezone": "UTC"
      },
      "shipments": [
        {
          "shipping_method": {
            "code": "UPS MIEXP",
            "name": "UPS MIEXP"
          },
          "tracking_number": "",
          "tracking_url": "",
          "shipped_at": {
            "date": "2018-05-29 15:42:37.000000",
            "timezone_type": 3,
            "timezone": "UTC"
          },
          "items": [
            {
              "item_id": 5443,
              "quantity": 1
            }
          ]
        }
      ],
      "items": [
        {
          "id": 5443,
          "external_id": null,
          "variant_id": 40,
          "name": "8\" x 8\"",
          "quantity": 1,
          "price": "5.34",
          "price_details": {
            "currency": "USD",
            "formatted": "$ 5.34",
            "in_subunit": 534
          },
          "file": "http:\/\/api.merchone.com\/premiumprint\/example\/orders\/PPO26149838T\/38ba27cda8fb5545f1676ddce67049df.jpg",
          "options": [
            {
              "id": 1,
              "name": "Canvas border",
              "value": {
                "id": 2,
                "name": "Folded"
              }
            },
            {
              "id": 2,
              "name": "Stretcher frame",
              "value": {
                "id": 6,
                "name": "2 cm"
              }
            }
          ],
          "retail_price": null,
          "retail_price_details": null
        }
      ],
      "totals": {
        "subtotal_amount": "5.34",
        "subtotal_amount_details": {
          "currency": "USD",
          "formatted": "$ 5.34",
          "in_subunit": 534
        },
        "shipping_amount": "3.70",
        "shipping_amount_details": {
          "currency": "USD",
          "formatted": "$ 3.70",
          "in_subunit": 370
        },
        "total_amount": "9.04",
        "total_amount_details": {
          "currency": "USD",
          "formatted": "$ 9.04",
          "in_subunit": 904
        },
        "customs_shipping_costs": "1111.00",
        "customs_shipping_costs_details": {
          "currency": "USD",
          "formatted": "$ 1111.00",
          "in_subunit": 111100
        }
      },
      "retail_costs": []
    }
  }
}Last updated
