v3 Ushahidi Platform REST API Documentation
  • V3
    • Overview
    • Login & Register
    • Posts
      • Sub Posts & Translation
    • Tags
    • Configuration
    • Data provider
    • Country Code
    • Tos
    • Permissons
    • Roles
    • Users
      • User Settings
    • Saved Search
    • Collections
      • Collections Page
    • Messages
    • Exports
    • Contacts
    • HXL
    • Media
    • Verifier
    • Migration
    • Notification
    • Layer
    • Webhooks
    • Api Keys
    • Forms
      • Form Attribute
      • Form Contacts
      • Form Role
      • Form Stages
    • CSV
    • Test
  • V5
    • Overview
    • Posts
    • Surveys
    • Categories
Powered by GitBook
On this page
  1. V3
  2. Forms

Form Contacts

PreviousForm AttributeNextForm Role

get form contacts

POST https://ushahididocs.api.ushahidi.io/api/v3/forms/9/contacts

Request Body

Name
Type
Description

contacts

String

{
    "form_id": 9,
    "count": 1,
    "invalidated_contacts": []
}{
    "form_id": 9,
    "count": 1,
    "invalidated_contacts": []
}

edit form contact

PUT https://ushahididocs.api.ushahidi.io/api/v3/forms/9/contacts/15

Request Body

Name
Type
Description

contacts

String

{
    "form_id": 9,
    "count": 1,
    "invalidated_contacts": []
}{
    "form_id": 9,
    "count": 1,
    "invalidated_contacts": []
}

get form contacts

get
Authorizations
Query parameters
orderbystringOptional

Sorting parameter Available values : entity fields Default value : id

Example: id
orderstringOptional

Sorting parameter Available values : [ASC,DESC] !! Default value : ASC "default not working"

Example: Desc
limitinteger · int32Optional

Paging parameter Default value : null

Example: 2
offsetinteger · int32Optional

Paging parameter Default value : 0

Example: 3
contactsstringOptional

Filter parameter check the contact value

Example: test
Responses
200
OK
application/json
401
Unauthorized
application/json
get
GET /api/v3/forms/9/contacts HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "count": 2,
  "results": [
    {
      "form_id": {},
      "count": 0,
      "invalidated_contacts": []
    },
    {
      "form_id": {},
      "count": 0,
      "invalidated_contacts": []
    }
  ],
  "offset": 0,
  "order": "asc",
  "orderby": "id",
  "curr": "http://localhost:8000/api/v3/forms/9/contacts?orderby=id&order=asc&offset=0",
  "next": "http://localhost:8000/api/v3/forms/9/contacts?orderby=id&order=asc&offset=0",
  "prev": "http://localhost:8000/api/v3/forms/9/contacts?orderby=id&order=asc&offset=0",
  "total_count": 2
}

get form contact

get
Authorizations
Responses
200
OK
application/json
401
Unauthorized
application/json
404
Not Found
application/json
get
GET /api/v3/forms/6/contacts/2 HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "form_id": {},
  "count": 0,
  "invalidated_contacts": []
}

delete form contact

delete
Authorizations
Responses
200
OK
application/json
401
Unauthorized
application/json
404
Not Found
application/json
delete
DELETE /api/v3/forms/9/contacts/1 HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "form_id": {},
  "count": 0,
  "invalidated_contacts": []
}
  • GETget form contacts
  • get form contacts
  • edit form contact
  • GETget form contact
  • DELETEdelete form contact