After you place an order, it's important to get updates on it from our platform.
We use webhooks to inform your software about updates on your order status.
This way, you can give your customers the most recent information about their orders.

To start getting webhooks, you can set up your callback URLs in the developer portal.
We always make sure our API is stable as it's essential for your business.
If we can't send you the webhook notification, we do an exponential backoff up to 10 times.

You can also poll the GET /api/v2/orders/{uuid} endpoint to get the latest status of the order request.

In the developer portal, you can subscribe to webhooks by adding a Webhook Url.
We will send POST requests to your Webhook Url when any of the following situations happen:

  • order_created: order is created on the GoGoX platform
  • order_matched: order is matched to a driver/courier partner
  • order_released: order is, unfortunately, released by the matched driver
  • amendment_added: order is completed and price amendments are added to the order
  • order_completed: order is completed
  • order_cancelled: order is cancelled

Sample POST request from GoGoX

{
  "kinds": [
    "order_created"
  ],
  "reasons": [
    "Order Available on Platform"
  ],
  "created_at": 0,
  "data": {
    "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "vehicle_type": "van",
    "payment_method": "prepaid_wallet",
    "note_to_courier": "string",
    "courier": {
      "name": "string",
      "phone_number": "string",
      "location": {
        "lat": 0,
        "lon": 0,
        "location_updated_at": 0
      }
    },
    "status": "pending",
    "pickup": {
      "schedule_at": 0,
      "name": "string",
      "street_address": "string",
      "floor_or_unit_number": "string",
      "location": {
        "lat": 0,
        "lng": 0
      },
      "contact": {
        "name": "string",
        "phone_number": "string",
        "phone_extension": "string"
      }
    },
    "destinations": [
      {
        "name": "string",
        "street_address": "string",
        "floor_or_unit_number": "string",
        "location": {
          "lat": 0,
          "lng": 0
        },
        "contact": {
          "name": "string",
          "phone_number": "string"
        }
      }
    ],
    "price": {
      "currency": "string",
      "amount": 0
    },
    "price_breakdown": [
      {
        "key": "fee",
        "amount": 0,
        "quantity": 0,
        "reason": "string"
      }
    ]
  }
}

JSON Body Parameters

NameTypeDescription
kindsArray of stringsThe category for the webhook.

One or more of the following:
- order_created
- order_matched
- order_released
- order_completed
- amendment_added

More than 1 kind is in the request when multiple attributes change at the same time; for example: [order_completed, amendment_added].
reasonsArray of stringsA description of the webhook trigger. It will map to the webhook category.

One or more of the following:
- Order Available on Platform
- Order Matched
- Order was released because: {release_reason}
- Order Completed
- Price amendment added for: {amendment_reason} (price: {amendment_price}).

The number of kinds and reasons will always be the same.
created_atintegerThe time the webhook was triggered.
dataobjectAn Order object. For object details, see the response from the Place an order endpoint.

Please see Order Life Cycle to learn more about each order status.