Unified Structure of Event Payload

Unified Webhook Events provide a standardized format for notifying subscribers about various occurrences or the resource changes within a system or platform. These events are designed to convey relevant information in a consistent manner, facilitating integration and automation processes.

Field DescriptionOptionalData TypeSample Data Value
event_typeWebhook event typeXstringinvoice.created
refThe reference ID of the resource. This reference ID can be used for GoFreight REST APIsXstring1002
timestampWebhook event timestampXnumber1691535792.22
__infoThe additional information of the event. Please note that we do not guarantee its backward compatibility.Oobject{}

Example:

{
  "event_type": "webhook_event_type",
  "ref": "reference_id",
  "timestamp": 1691535792.22,
  "__info": {}
}

Supported Webhook Event Types

Ocean Import MB/L Created Event

This event is triggered when ocean import MB/L is created.

{
  "event_type": "oi_mbl.created",
  "ref": "mbl_ref",
  "timestamp": 1706337141.0
}

Ocean Import MB/L Updated Event

This event is triggered when ocean import MB/L is updated.

{
  "event_type": "oi_mbl.updated",
  "ref": "mbl_ref",
  "timestamp": 1706337141.0
}

Ocean Import MB/L Deleted Event

This event is triggered when ocean import MB/L is deleted.

{
  "event_type": "oi_mbl.deleted",
  "ref": "mbl_ref",
  "timestamp": 1706337141.0
}

Ocean Import HB/L Created Event

This event is triggered when ocean import HB/L is created.

{
  "event_type": "oi_hbl.created",
  "ref": "hbl_ref",
  "timestamp": 1706337141.0
}

Ocean Import HB/L Updated Event

This event is triggered when ocean import HB/L is updated.

{
  "event_type": "oi_hbl.updated",
  "ref": "hbl_ref",
  "timestamp": 1706337141.0
}

Ocean Import HB/L Deleted Event

This event is triggered when ocean import HB/L is deleted.

{
  "event_type": "oi_hbl.deleted",
  "ref": "hbl_ref",
  "timestamp": 1706337141.0
}

Ocean Export MB/L Created Event

This event is triggered when ocean export MB/L is created.

{
  "event_type": "oe_mbl.created",
  "ref": "mbl_ref",
  "timestamp": 1706337141.0
}

Ocean Export MB/L Updated Event

This event is triggered when ocean export MB/L is updated.

{
  "event_type": "oe_mbl.updated",
  "ref": "mbl_ref",
  "timestamp": 1706337141.0
}

Ocean Export MB/L Deleted Event

This event is triggered when ocean export MB/L is deleted.

{
  "event_type": "oe_mbl.deleted",
  "ref": "mbl_ref",
  "timestamp": 1706337141.0
}

Ocean Export HB/L Created Event

This event is triggered when ocean export HB/L is created.

{
  "event_type": "oe_hbl.created",
  "ref": "hbl_ref",
  "timestamp": 1706337141.0
}

Ocean Export HB/L Updated Event

This event is triggered when ocean export HB/L is updated.

{
  "event_type": "oe_hbl.updated",
  "ref": "hbl_ref",
  "timestamp": 1706337141.0
}

Ocean Export HB/L Deleted Event

This event is triggered when ocean export HB/L is deleted.

{
  "event_type": "oe_hbl.deleted",
  "ref": "hbl_ref",
  "timestamp": 1706337141.0
}

Invoice Created Event

This event is triggered when an invoice is created.

{
  "event_type": "invoice.created",
  "ref": "invoice_ref",
  "timestamp": 1691535792.22,
  "__info": {
    "invoice_no": "Invoice NO."
  }
}

Invoice Updated Event

This event is triggered when an invoice is updated.

{
    "event_type": "invoice.updated",
    "ref": "invoice_ref",
    "timestamp": 1691535792.22,
    "__info": {
      "invoice_no": "Invoice NO.",
      "updated_fields": {
        ...
      }
    }
}

Invoice Deleted Event

This event is triggered when an invoice is deleted.

{
  "event_type": "invoice.deleted",
  "ref": "invoice_ref",
  "timestamp": 1691535792.22,
  "__info": {
    "invoice_no": "Invoice NO."
  }
}

Invoice Blocked Event

This event is triggered when an invoice is blocked. For the definition of invoice block & unblock, please refer to the invoice block/unblock paragraph in the Terminology section.

{
  "event_type": "invoice.blocked",
  "ref": "invoice_ref",
  "timestamp": 1691535792.22,
  "__info": {
    "invoice_no": "Invoice NO."
  }
}

Invoice Unblocked Event

This event is triggered when an invoice is unblocked. For the definition of invoice block & unblock, please refer to the invoice block/unblock paragraph in the Terminology section.

{
  "event_type": "invoice.unblocked",
  "ref": "invoice_ref",
  "timestamp": 1691535792.22,
  "__info": {
    "invoice_no": "Invoice NO."
  }
}

⚠️ (Deprecated) Invoice Block Status Updated Event

Click here for the details.

This event is triggered when an invoice is either blocked or unblocked. For the definition of invoice block & unblock, please refer to the invoice block/unblock paragraph in the Terminology section.

{
  "event_type": "INVOICE_BLOCK_STATUS_UPDATED",
  "timestamp": 1691535792.22,
  "invoice": {
    "ref": "invoice_ref",
    "invoice_no": "invoice_no",
    "system_no": "system_no",
    "customer_ref_no": "customer_ref_no",
    "type": "S",
    "amount": "123.23",
    "paid_amount": "0",
    "tax_amount": "10.00",
    "process_state": "N",
    "post_date": "2023-07-31T20:35:03",
    "due_date": "2023-08-01T20:35:03",
    "is_block": true,
    "block_by": {
      "ref": 3,
      "username": "block by username"
    },
    "block_date": "2023-08-22",
    "is_general_expense": false,
    "remark": "some description",
    "lines": [
      {
        "ref": 54140,
        "name": "ISF FILING FEE",
        "type": "B",
        "freight_term": "C",
        "unit": "UNT",
        "link_type": "AP-OC",
        "currency": {
          "ref": 1,
          "name": "USD"
        },
        "currency_amount": "123.23",
        "volume": "12",
        "rate": "28.27",
        "amount": "339.24",
        "billing_code": {
          "ref": 121,
          "code": "OI07ISF",
          "name": "ISF FILING FEE",
          "general_ledger_code": {
            "ref": 157,
            "code": "45406",
            "type": "CO"
          }
        },
        "tax": {
          "name": "tax_name",
          "type": "S",
          "rate": "10.0"
        }
      }
    ]
  },
  "creator": {
    "ref": "user_ref",
    "username": "user name",
    "email": "user email"
  },
  "trade_partner": {
    "ref": "tp_ref",
    "type": "CS",
    "name": "tp name",
    "local_name": "tp local name",
    "short_name": "tp short name"
  },
  "mbl": {
    "ref": "mbl_ref",
    "transportation_mode": "OI",
    "mbl_no": "mbl no"
  },
  "hbl": {
    "ref": "new_hbl_ref",
    "transportation_mode": "OI",
    "hbl_no": "hbl no"
  },
  "office": {
    "ref": "office_ref",
    "short_name": "office short name",
    "full_name": "office full name",
    "local_name": "office local name"
  }
}

Payment Blocked Event

This event is triggered when a payment is blocked.

{
  "event_type": "payment.blocked",
  "ref": "payment_ref",
  "timestamp": 1691535792.22
}

Payment Unblocked Event

This event is triggered when a payment is unblocked.

{
  "event_type": "payment.unblocked",
  "ref": "payment_ref",
  "timestamp": 1691535792.22
}

Container Created Event

This event is triggered when a container is created.

{
  "event_type": "container.created",
  "ref": "container_ref",
  "timestamp": 1691535792.22,
  "__info": {
    "container_no": "Container NO."
  }
}

Container Updated Event

This event is triggered when a container is updated.

{
    "event_type": "container.updated",
    "ref": "container_ref",
    "timestamp": 1691535792.22,
    "__info": {
      "container_no": "Container NO.",
      "updated_fields": {
        ...
      }
    }
}

Container Deleted Event

This event is triggered when a container is deleted.

{
  "event_type": "container.deleted",
  "ref": "container_ref",
  "timestamp": 1691535792.22,
  "__info": {
    "container_no": "Container NO."
  }
}

Trade Partner Created Event

This event is triggered when a trade partner is deleted.

{
  "event_type": "trade_partner.created",
  "ref": "tp_code",
  "timestamp": 1691535792.22,
  "__info": {
    "readable_name": "TP Name"
  }
}

Trade Partner Updated Event

This event is triggered when a trade partner is updated.

{
    "event_type": "trade_partner.updated",
    "ref": "tp_code",
    "timestamp": 1691535792.22,
    "__info": {
      "readable_name": "TP Name",
      "updated_fields": [...]
    }
}

Trade Partner Merged Event

This event is triggered when a trade partner is merged.

{
  "event_type": "trade_partner.merged",
  "ref": "TP code 1",
  "timestamp": 1691535792.22,
  "__info": {
    "readable_name": "TP Name 1",
    "merged_from_code": "TP code 2",
    "merged_from_name": "TP Name 2"
  }
}

Trade Partner Deleted Event

This event is triggered when a trade partner is deleted.

{
  "event_type": "trade_partner.deleted",
  "ref": "tp_code",
  "timestamp": 1691535792.22,
  "__info": {
    "readable_name": "TP Name"
  }
}

Billing Code Created Event

This event is triggered when a billing code is created.

{
  "event_type": "billing_code.created",
  "ref": "billing_code_ref",
  "timestamp": 1691535792.22,
  "__info": {
    "readable_name": "code"
  }
}

Billing Code Updated Event

This event is triggered when a billing code is updated.

{
  "event_type": "billing_code.updated",
  "ref": "billing_code_ref",
  "timestamp": 1691535792.22,
  "__info": {
    "readable_name": "code",
    "updated_fields": [...]
  }
}