Webhook Reference

Example of delivery callback payload

post

This endpoint describes the structure of the payload sent to your configured webhook when a delivery status update occurs. It is not an actual callback trigger. The format of the data is defined in the CallbackDeliveryPayload schema. Your webhook must be capable of accepting POST requests with this structure.

Responses
200
Example payload structure
application/json
post
POST /webhook/callback-example HTTP/1.1
Host: test.swooveapi.com
Accept: */*
200

Example payload structure

{
  "success": true,
  "code": 200,
  "message": "Delivery Update Callback",
  "responses": [
    {
      "pickup": {
        "type": "text",
        "value": "text",
        "contact": {
          "name": "text",
          "mobile": "text",
          "email": "text"
        },
        "country_code": "GH",
        "lat": 1,
        "lng": 1,
        "location": "text"
      },
      "dropoff": {
        "type": "text",
        "value": "text",
        "contact": {
          "name": "text",
          "mobile": "text",
          "email": "text"
        },
        "country_code": "GH",
        "lat": 1,
        "lng": 1,
        "location": "text"
      },
      "return_contact": {
        "coordinates": [
          1
        ]
      },
      "full_price": {
        "discount": 0,
        "value": 0,
        "currency_code": "GHS",
        "currency_symbol": "₵",
        "currency_name": "Ghanaian cedi"
      },
      "contact": {
        "name": "text",
        "mobile": "text",
        "email": "text"
      },
      "return_delivery": true,
      "return_reason": "text",
      "distance": 1,
      "individual_pricing_id": "text",
      "status": "PENDING",
      "instructions": "text",
      "reference": "text",
      "start_time": 1,
      "end_time": 1,
      "time_completed": 1,
      "items": [
        {
          "itemName": "text",
          "itemQuantity": 1,
          "itemCost": 1,
          "description": "text",
          "itemWeight": 1,
          "is_fragile": false,
          "dimensions": {
            "x": 1,
            "y": 1,
            "z": 1
          }
        }
      ],
      "tracking_code": "text",
      "delivery_code": "text",
      "secret_code": "text",
      "createdAt": "text",
      "updatedAt": "text",
      "tracking_link": "text",
      "proof_of_delivery": {
        "location": {
          "latitude": 1,
          "longitude": 1,
          "address": "text"
        },
        "_id": "text",
        "delivery_id": "text",
        "image_url": "https://example.com",
        "mobile": "text",
        "name": "text"
      },
      "agent_details": {
        "agent_first_name": "text",
        "agent_last_name": "text",
        "agent_mobile": "text",
        "agent_picture": "text",
        "license_type": "text",
        "license_number": "text",
        "license_expiry": 1
      },
      "agency_details": {
        "name": "Agency Name",
        "mobile_number": 23350484565,
        "logo": "text",
        "rating": 1,
        "location": {
          "country_code": "GH",
          "latitude": 0,
          "longitude": 0,
          "city": "text",
          "country": "text"
        }
      },
      "vehicle_details": {
        "brand": "text",
        "model": "text",
        "color": "text",
        "picture": "text",
        "license_plate_number": "text",
        "insurance_provider": "text"
      }
    }
  ]
}

Was this helpful?