Service Requests

API endpoints available for interacting with Service Requests.

List Service Requests

GET https://muni-portal-backend.openup.org.za/api/service-requests/

Retrieve a list of Service Request objects that belong to the user making the request.

[
    {
        "id": 3,
        "collaborator_object_id": 556706,
        "type": "Roads",
        "user_name": "Mr Test",
        "user_surname": "Surname",
        "user_mobile_number": "0792816737",
        "user_email_address": "user@example.com",
        "municipal_account_number": null,
        "street_name": "Geen Straat",
        "street_number": "123",
        "suburb": "Daar",
        "description": "Iets is fout",
        "coordinates": null,
        "request_date": "2020-01-01",
        "mobile_reference": "12345",
        "on_premis_reference": "373834",
        "status": "Registered",
        "demarcation_code": "WC033",
        "user": 1
    },
    {
        "id": 2,
        "collaborator_object_id": 556705,
        "type": "Sewerage",
        "user_name": "Mr JD",
        "user_surname": "Bothma",
        "user_mobile_number": "0792816737",
        "user_email_address": "jd@openup.org.za",
        "municipal_account_number": null,
        "street_name": "Geen Straat",
        "street_number": "123",
        "suburb": "Daar",
        "description": "This one has the date 2020-02-04 sent from the app",
        "coordinates": "12.3, 45.6",
        "request_date": "2020-02-04",
        "mobile_reference": null,
        "on_premis_reference": "373762",
        "status": "Assigned",
        "demarcation_code": "WC033",
        "user": 1
    },
    {
        "id": 1,
        "collaborator_object_id": 556704,
        "type": "Sewerage",
        "user_name": "Mr JD",
        "user_surname": "Bothma",
        "user_mobile_number": "0792816737",
        "user_email_address": "jd@openup.org.za",
        "municipal_account_number": null,
        "street_name": "Geen Straat",
        "street_number": "123",
        "suburb": "Daar",
        "description": "This one has the date 2020-02-01 sent from the app",
        "coordinates": "12.3, 45.6",
        "request_date": "2020-02-01",
        "mobile_reference": null,
        "on_premis_reference": "373761",
        "status": "Assigned",
        "demarcation_code": "WC033",
        "user": 1
    }
]

Detail Service Request

GET https://muni-portal-backend.openup.org.za/api/service-requests/:id/

Retrieve detail about a Service Request object.

Path Parameters

Name
Type
Description

id

integer

Service Request object identifier

{
    "id": 1,
    "collaborator_object_id": 556704,
    "type": "Sewerage",
    "user_name": "Mr JD",
    "user_surname": "Bothma",
    "user_mobile_number": "0792816737",
    "user_email_address": "jd@openup.org.za",
    "municipal_account_number": null,
    "street_name": "Geen Straat",
    "street_number": "123",
    "suburb": "Daar",
    "description": "This one has the date 2020-02-01 sent from the app",
    "coordinates": "12.3, 45.6",
    "request_date": "2020-02-01",
    "mobile_reference": null,
    "on_premis_reference": "373761",
    "status": "Assigned",
    "demarcation_code": "WC033",
    "user": 1
}

Create Service Request

POST https://muni-portal-backend.openup.org.za/api/service-requests/

Create a Service Request object. The object is not visible in List or Detail views until it has successfully been created in Collaborator Web API. If the object does show up in List or Detail views, it has successfully been created in Collaborator Web API and will have the status "created."

Request Body

Name
Type
Description

coordinates

string

Latitude, Longitude as Decimal Degrees e.g. -34.8161234, 19.9712024

description

string

Description

suburb

string

Suburb (We supply Town in this field)

street_number

string

Street number

street_name

string

Street name

user_mobile_number

string

Mobile number

user_surname

string

Surname

user_name

string

First name

type

string

Type (Service Area)

{}

Last updated