Skip to content

Coverage

API endpoints for Coverage management in LSP.

Add coverage area segment

http
POST /v1/lsp/coverage/areas/:type

Headers

  • de-user-agent (required)
  • de-auth-token (required)
  • de-auth-device (required)

Request Body

typescript
interface Add coverage area segmentRequest {
  name: string;
  code: string;
  reach: string;
  serviceLevel: string;
  transit: {
    type: string;
    mode: string;
    time: {
    min: {
    hour: number
  };
    max: {
    hour: number
  }
  }
  };
  schedules: {
    frequency: string;
    departureTimes: {
    value: string;
    timezone: string
  }[];
    operatingDays: string[]
  };
  capacity: {
    packages: number
  };
  isGuaranteed: boolean;
  country: string;
  region: string;
  city: string;
}

Example:

json
{
  "name": "dispatch-net",
  "code": "2B-O",
  "reach": "LOCAL",
  "serviceLevel": "STANDARD",
  "transit": {
    "type": "LAST_MILE",
    "mode": "GROUND",
    "time": {
      "min": {
        "hour": 12
      },
      "max": {
        "hour": 24
      }
    }
  },
  "schedules": {
    "frequency": "HOURLY",
    "departureTimes": [
      {
        "value": "08:00",
        "timezone": "Africa/Accra"
      },
      {
        "value": "02:30",
        "timezone": "Africa/Accra"
      }
    ],
    "operatingDays": [
      "MONDAY",
      "WEDNESDAY",
      "FRIDAY"
    ]
  },
  "capacity": {
    "packages": 200
  },
  "isGuaranteed": true,
  "country": "GH",
  "region": "Greater Accra",
  "city": "Accra"
}

Get coverage area

http
GET /v1/lsp/coverage/areas/:id

Headers

  • de-user-agent (required)
  • de-auth-token (required)
  • de-auth-device (required)

Get all coverage areas

http
GET /v1/lsp/coverage/areas

Headers

  • de-user-agent (required)
  • de-auth-token (required)
  • de-auth-device (required)

Update coverage area

http
PATCH /v1/lsp/coverage/areas/:id/:type

Headers

  • de-user-agent (required)
  • de-auth-token (required)
  • de-auth-device (required)
http
PUT /v1/lsp/coverage/areas/:id/link

Headers

  • de-user-agent (required)
  • de-auth-token (required)
  • de-auth-device (required)

Request Body

typescript
interface Link coverage area to a network nodeRequest {
  type: string;
  address: {
    name: string;
    street1: string;
    city: string;
    state: string;
    country: string;
    coordinates: number[]
  };
}

Example:

json
{
  "type": "ANY",
  "address": {
    "name": "Adenta Public Hub",
    "street1": "Taxi Barrier, Adenta",
    "city": "Accra",
    "state": "Greater Accra",
    "country": "Ghana",
    "coordinates": [
      -0.1387423,
      5.1284859
    ]
  }
}

Response

- Link coverage area to a hub:

Status: 200

json
{
  "error": false,
  "status": "COVERAGE::UPDATED",
  "message": "Coverage Area Linked",
  "area": {
    "workspace": {
      "type": "LSP",
      "icode": "LSP-39F9-4FB1DCB"
    },
    "id": "91ee8e44-3b93-4dda-b6f5-c8b04de571f9",
    "code": "2B-O",
    "name": "dispatch-net",
    "status": "INACTIVE",
    "reach": "LOCAL",
    "serviceLevel": "STANDARD",
    "transitTime": {
      "min": {
        "hour": 12
      },
      "max": {
        "hour": 24
      }
    },
    "transitMode": "GROUND",
    "schedules": {
      "frequency": "HOURLY",
      "departureTimes": [
        {
          "value": "08:00",
          "timezone": "Africa/Accra"
        },
        {
          "value": "02:30",
          "timezone": "Africa/Accra"
        }
      ],
      "operatingDays": [
        "MONDAY",
        "WEDNESDAY",
        "FRIDAY"
      ]
    },
    "capacity": {
      "packages": 200
    },
    "isGuaranteed": true,
    "added": {
      "at": {
        "timestamp": 1753935281908,
        "timezone": "*"
      },
      "by": "c8efe5f7-68c4-4442-aeec-8df6b65fcc5b"
    },
    "updated": {
      "at": {
        "timestamp": 1753935395808,
        "timezone": "*"
      },
      "by": "c8efe5f7-68c4-4442-aeec-8df6b65fcc5b"
    },
    "type": "AREA",
    "radius": {
      "value": 30,
      "unit": "km"
    },
    "country": "GH",
    "region": "Greater Accra",
    "cities": [
      "Accra",
      "Tema",
      "Aburi"
    ],
    "linkedTo": [
      {
        "type": "HUB",
        "id": "9949fa49-b0fb-4d8e-b9fc-85e1be01f851",
        "description": "Big Ada Distribution Hub"
      }
    ]
  },
  "trace": "f9713e24-6ca2-4203-b83a-33e30d0f6e0d"
}

- Link coverage area to address:

Status: 200

json
{
  "error": false,
  "status": "COVERAGE::UPDATED",
  "message": "Coverage Area Linked",
  "area": {
    "workspace": {
      "type": "LSP",
      "icode": "LSP-39F9-4FB1DCB"
    },
    "id": "e567d565-e998-46bc-bfa0-8c3599f7bdd8",
    "code": "2B-O",
    "name": "dispatch-net",
    "status": "INACTIVE",
    "reach": "LOCAL",
    "serviceLevel": "STANDARD",
    "transitTime": {
      "min": {
        "hour": 12
      },
      "max": {
        "hour": 24
      }
    },
    "transitMode": "GROUND",
    "schedules": {
      "frequency": "HOURLY",
      "departureTimes": [
        {
          "value": "08:00",
          "timezone": "Africa/Accra"
        },
        {
          "value": "02:30",
          "timezone": "Africa/Accra"
        }
      ],
      "operatingDays": [
        "MONDAY",
        "WEDNESDAY",
        "FRIDAY"
      ]
    },
    "capacity": {
      "packages": 200
    },
    "isGuaranteed": true,
    "added": {
      "at": {
        "timestamp": 1753935950472,
        "timezone": "*"
      },
      "by": "c8efe5f7-68c4-4442-aeec-8df6b65fcc5b"
    },
    "updated": {
      "at": {
        "timestamp": 1753936061438,
        "timezone": "*"
      },
      "by": "c8efe5f7-68c4-4442-aeec-8df6b65fcc5b"
    },
    "type": "AREA",
    "radius": {
      "value": 30,
      "unit": "km"
    },
    "country": "GH",
    "region": "Greater Accra",
    "cities": [
      "Accra",
      "Tema",
      "Aburi"
    ],
    "linkedTo": [
      {
        "type": "HUB",
        "id": "9949fa49-b0fb-4d8e-b9fc-85e1be01f851",
        "description": "Big Ada Distribution Hub"
      },
      {
        "type": "ANY",
        "address": {
          "name": "Adenta Public Hub",
          "street1": "Taxi Barrier, Adenta",
          "city": "Accra",
          "state": "Greater Accra",
          "coordinates": [
            -0.1387423,
            5.1284859
          ],
          "country": "Ghana"
        }
      }
    ]
  },
  "trace": "7c4bc7fa-0fe8-4ed3-9bd1-1ed10977a9a7"
}
http
PATCH /v1/lsp/coverage/areas/:id/unlink

Headers

  • de-user-agent (required)
  • de-auth-token (required)
  • de-auth-device (required)

Delete coverage area

http
DELETE /v1/lsp/coverage/areas/:id

Headers

  • de-user-agent (required)
  • de-auth-token (required)
  • de-auth-device (required)

Add coverage route segment

http
POST /v1/lsp/coverage/routes/:type

Headers

  • de-user-agent (required)
  • de-auth-token (required)
  • de-auth-device (required)

Request Body

typescript
interface Add coverage route segmentRequest {
  name: string;
  code: string;
  reach: string;
  serviceLevel: string;
  transit: {
    type: string;
    mode: string;
    time: {
    min: {
    hour: number
  };
    max: {
    hour: number
  }
  }
  };
  schedules: {
    frequency: string;
    departureTimes: {
    value: string;
    timezone: string
  }[];
    operatingDays: string[]
  };
  capacity: {
    sits: number;
    packages: number
  };
  isGuaranteed: boolean;
  origin: {
    type: string;
    id: string
  };
  destination: {
    type: string;
    address: {
    name: string;
    street1: string;
    city: string;
    state: string;
    country: string;
    coordinates: number[]
  }
  };
  distance: {
    value: number;
    unit: string
  };
}

Example:

json
{
  "name": "travel-net",
  "code": "3B-O",
  "reach": "NATIONAL",
  "serviceLevel": "STANDARD",
  "transit": {
    "type": "HUB_TO_TERMINAL",
    "mode": "GROUND",
    "time": {
      "min": {
        "hour": 3
      },
      "max": {
        "hour": 4
      }
    }
  },
  "schedules": {
    "frequency": "HOURLY",
    "departureTimes": [
      {
        "value": "08:00",
        "timezone": "Africa/Accra"
      },
      {
        "value": "02:30",
        "timezone": "Africa/Accra"
      }
    ],
    "operatingDays": [
      "MONDAY",
      "TUESDAY",
      "WEDNESDAY",
      "THURSDAY",
      "FRIDAY",
      "SATURDAY"
    ]
  },
  "capacity": {
    "sits": 12,
    "packages": 18
  },
  "isGuaranteed": true,
  "origin": {
    "type": "HUB",
    "id": "{{LSPHubId}}"
  },
  "destination": {
    "type": "TERMINAL",
    "address": {
      "name": "Aplao Station",
      "street1": "Border town, Aploa",
      "city": "Aplao",
      "state": "Greater Accra",
      "country": "Ghana",
      "coordinates": [
        -0.1387423,
        5.1284859
      ]
    }
  },
  "distance": {
    "value": 302,
    "unit": "km"
  }
}

Get coverage route

http
GET /v1/lsp/coverage/routes/:id

Headers

  • de-user-agent (required)
  • de-auth-token (required)
  • de-auth-device (required)

Get all coverage routes

http
GET /v1/lsp/coverage/routes

Headers

  • de-user-agent (required)
  • de-auth-token (required)
  • de-auth-device (required)

Update coverage route

http
PATCH /v1/lsp/coverage/routes/:id/:type

Headers

  • de-user-agent (required)
  • de-auth-token (required)
  • de-auth-device (required)

Add transit point to coverage route

http
PUT /v1/lsp/coverage/routes/:id/transit-point

Headers

  • de-user-agent (required)
  • de-auth-token (required)
  • de-auth-device (required)

Response

- Add transit point with address:

Status: 200

json
{
  "error": false,
  "status": "COVERAGE::UPDATED",
  "message": "Coverage Route Transite Point Added",
  "route": {
    "workspace": {
      "type": "LSP",
      "icode": "LSP-39F9-4FB1DCB"
    },
    "id": "d3c497d3-13a2-4b97-9f1d-50d66db172e9",
    "code": "3B-O",
    "name": "travel-net",
    "status": "INACTIVE",
    "reach": "NATIONAL",
    "serviceLevel": "STANDARD",
    "transitTime": {
      "min": {
        "hour": 3
      },
      "max": {
        "hour": 4
      }
    },
    "transitMode": "GROUND",
    "schedules": {
      "frequency": "HOURLY",
      "departureTimes": [
        {
          "value": "08:00",
          "timezone": "Africa/Accra"
        },
        {
          "value": "02:30",
          "timezone": "Africa/Accra"
        }
      ],
      "operatingDays": [
        "MONDAY",
        "TUESDAY",
        "WEDNESDAY",
        "THURSDAY",
        "FRIDAY",
        "SATURDAY"
      ]
    },
    "capacity": {
      "sits": 12,
      "packages": 18
    },
    "isGuaranteed": true,
    "added": {
      "at": {
        "timestamp": 1753934486491,
        "timezone": "*"
      },
      "by": "c8efe5f7-68c4-4442-aeec-8df6b65fcc5b"
    },
    "updated": {
      "at": {
        "timestamp": 1753934501106,
        "timezone": "*"
      },
      "by": "c8efe5f7-68c4-4442-aeec-8df6b65fcc5b"
    },
    "type": "ROUTE",
    "origin": {
      "type": "HUB",
      "id": "9949fa49-b0fb-4d8e-b9fc-85e1be01f851"
    },
    "destination": {
      "type": "TERMINAL",
      "address": {
        "name": "Aplao Station",
        "street1": "Border town, Aploa",
        "city": "Aplao",
        "state": "Greater Accra",
        "coordinates": [
          -0.1387423,
          5.1284859
        ],
        "country": "Ghana"
      }
    },
    "distance": {
      "value": 302,
      "unit": "km"
    },
    "transitPoints": [
      {
        "type": "BARRIER",
        "address": {
          "name": "Sogakope Immigration",
          "street1": "Sogakope Bridge, Volta",
          "city": "Sogakope",
          "state": "Greater Accra",
          "coordinates": [
            -0.1387423,
            5.1284859
          ],
          "country": "Ghana"
        }
      }
    ]
  },
  "trace": "dd224bef-ebe8-46d4-a8ff-dc50446b158d"
}

- Add transit point with segment ID:

Status: 200

json
{
  "error": false,
  "status": "COVERAGE::UPDATED",
  "message": "Coverage Route Transite Point Added",
  "route": {
    "workspace": {
      "type": "LSP",
      "icode": "LSP-39F9-4FB1DCB"
    },
    "id": "90fc25fb-09e5-4a6e-a696-a66e0fbe9043",
    "code": "3B-O",
    "name": "travel-net",
    "status": "INACTIVE",
    "reach": "NATIONAL",
    "serviceLevel": "STANDARD",
    "transitTime": {
      "min": {
        "hour": 3
      },
      "max": {
        "hour": 4
      }
    },
    "transitMode": "GROUND",
    "schedules": {
      "frequency": "HOURLY",
      "departureTimes": [
        {
          "value": "08:00",
          "timezone": "Africa/Accra"
        },
        {
          "value": "02:30",
          "timezone": "Africa/Accra"
        }
      ],
      "operatingDays": [
        "MONDAY",
        "TUESDAY",
        "WEDNESDAY",
        "THURSDAY",
        "FRIDAY",
        "SATURDAY"
      ]
    },
    "capacity": {
      "sits": 12,
      "packages": 18
    },
    "isGuaranteed": true,
    "added": {
      "at": {
        "timestamp": 1753936120552,
        "timezone": "*"
      },
      "by": "c8efe5f7-68c4-4442-aeec-8df6b65fcc5b"
    },
    "updated": {
      "at": {
        "timestamp": 1753936126311,
        "timezone": "*"
      },
      "by": "c8efe5f7-68c4-4442-aeec-8df6b65fcc5b"
    },
    "type": "ROUTE",
    "origin": {
      "type": "HUB",
      "id": "9949fa49-b0fb-4d8e-b9fc-85e1be01f851"
    },
    "destination": {
      "type": "TERMINAL",
      "address": {
        "name": "Aplao Station",
        "street1": "Border town, Aploa",
        "city": "Aplao",
        "state": "Greater Accra",
        "coordinates": [
          -0.1387423,
          5.1284859
        ],
        "country": "Ghana"
      }
    },
    "distance": {
      "value": 302,
      "unit": "km"
    },
    "transitPoints": [
      {
        "type": "HUB",
        "id": "9949fa49-b0fb-4d8e-b9fc-85e1be01f851",
        "description": "Akati delivery consolidation point"
      }
    ]
  },
  "trace": "0bfd1e95-5be4-41c7-8b9c-6de23ef241f3"
}

Remove coverage route transit point

http
PATCH /v1/lsp/coverage/routes/:id/transit-point

Headers

  • de-user-agent (required)
  • de-auth-token (required)
  • de-auth-device (required)

Delete coverage route

http
DELETE /v1/lsp/coverage/routes/:id

Headers

  • de-user-agent (required)
  • de-auth-token (required)
  • de-auth-device (required)

Get all coverage

http
GET /v1/lsp/coverage

Headers

  • de-user-agent (required)
  • de-auth-token (required)
  • de-auth-device (required)