Claim Comment (sub-object) Retrieve All Retrieve One Create Update Add Documents Remove Documents Show or Hide Documents Publish/Unpublish Update Status

Claim

The main object for claims. They are called "cases" on the front end.

Properties

id

string

Unique identifier of the claim

blacklister

string id

ID of the user that created the claim

company.name

string

Name of the defaulter

company.country

string

Full name of the country of the defaulter

company.countryCode

string

Two character country code for the country

company.address

string (optional)

Address for the defaulter

company.contactInfo

string (optional)

Contact information for the defaulter

refNumber

string

Unique reference number for the claim

description

string

Short description/title of the claim

claimAmount

number

Total amount of the claim as in integer, no decimals. For example. $50.55 will be 5055.

claimCurrency

string (optional)

Currency type used for the claimAmount

details

string

Full details of the claim from the blacklister

supportingDocs

Array of object

Object containing information on documents submitted in support of the claim by the blacklister. Contains a name, a link, and a boolean tag 'hidden' for each document. 'hidden' determines whether this is visible to other users or just administrators.

objection

string (optional)

The objection to the claim from the defaulter

objectionDocs

Array of object

Object containing information on documents submitted in objection to the claim by the defaulter. Contains a name, a link, and a boolean tag 'hidden' for each document. 'hidden' determines whether this is visible to other users of just administrators.

status

string

Current status of the claim. One of: 'pending', 'objection', 'active', 'hold', 'details', 'resolvedBP', 'resolvedAP', 'declined' or 'admin'.

published

boolean

Boolean tag that determines whether the claim is published and visible to users.

comments

Array of object

Comments in discussion between admins, users and defaulters. Defined in comments

defaulterPass

string

Password for the defaulter to access the details and conversation around the claim.

updates

Array of object

Contains date, title of the content that was changed, and the change in content for each change on the claim.

Comment

The object containg the data for each comment made in the claim discussion by an admin, user, or defaulter.

Properties

date

Date

Date and time the comment was made

commenter

string ID

ID of the user or admin that made the comment. If commenterType is 'defaulter', this is undefined.

commenterType

string

Displays whether the commenter is a user, admin or defaulter

commenterName

string

Name of the commenter

content

string

The actual content of the comment

Retrieve All Claims

GET /admin/case

auth required

Returns a list of all claims. Each claim will contain a subset of the claim data

Response Body

N/A (unnamed array)

Array of Claim

An array containing a list of claims. Contains only '_id', 'refNumber', 'status', 'companyName', 'claimAmount', 'claimCurrency'

Retrieve One

GET /admin/case/:claimId

auth required (view claim)

Retrieve all of the details for a single claim

Response Body

N/A

Claim

Claim with all data

Create Claim

POST /admin/case

Create a new claim

Request Body

blacklister

string ID

ID of user that created the claim

companyName

string

Name of the defaulter company

countryCode

string

Two-character country code of the location of the defaulter company

address

string (optional)

Address of the defaulter company

contactInfo

string (optional)

Any contact information for the defaulter company

status

string

One of the acceptable strings representing the status of the claim

description

string

Short description of the claim

status

string

Current status of the claim

claimAmount

number

Amount claimed owed by the user. Round to nearest integer. For example, 15.43 should be submitted as 1543.

claimCurrency

string

Some string representing the currency represented by 'claimAmount'

details

string

Detailed description of all of the details of the claim

supportingDocs

[File] (optional)

One or more files that present support for the claim

objection

string (optional)

Counter argument from the defaulter

objectionDocs

[File] (optional)

One or more files that contest the claim

Response Body

N/A

Claim

Claim with all data

Update Claim

PUT /admin/case/:claimId

Update some information on a claim

Request Body

companyName

string (optional)

Name of the defaulter company

countryCode

string (optional)

Two-character country code

address

string (optional)

Address of defaulter company

contactInfo

string (optional)

Contact information for the defaulter company

claimAmount

number (optional)

Integer number representing case amount in provided currency

claimCurrency

string

Name or label of the currency type

description

string (optional)

Short description of the case

details

string (optional)

Detailed account of the case

objection

string (optional)

Objection filed by the defaulter

Response Body

N/A

Claim

Claim with all data

Add Documents

PUT /admin/case/:claimId/documents/add

Add documents to a claim. They can either be supporting documents or objection documents, not both. If you need both, then make a seperate request. Must use Multipart/Form.

Request Body

type

string (enum)

  • supporting
  • objection

String that defines whether the documents are supporting or objection documents.

documents

[File]

The files to be added to the claim

Response Body

N/A

Claim

Claim with all data

Remove Documents

PUT /admin/case/:claimId/documents/remove

Remove documents from a claim. You need not differentiate between supporting documents or objection documents.

Request Body

N/A

array of string

Array containing string IDs of documents to remove.

Response Body

N/A

Claim

Claim with all data

Show or Hide Documents

PUT /admin/case/:claimId/documents

Show or hide certain objection of supporting documents. You need not differentiate between supporting documents or objection documents. Request is an array of objects. The following properties are for each object.

Request Body

id

string

The ID of the document to update.

hidden

boolean

Boolean determining whether the document should be hidden (true) or shown (false)

Response Body

N/A

Claim

Claim with all data

Publish/Unpublish

PUT /admin/case/:claimId/publish

Mark a case as published or unpublished. This will determine whether it is shown to and searchable by users.

Request Body

published

boolean

Boolean determining whether the claim should be published (true) or not (false)

Response Body

N/A

Claim

Claim with all data

Update Status

PUT /admin/case/:claimId/status

Update the current status of a claim.

Request Body

status

string (enum)

  • pending
  • objection
  • active
  • hold
  • details
  • resolvedBP
  • resolvedAP
  • declined
  • admin

New status for the claim. An enum based on one of the above options

Response Body

N/A

Claim

Claim with all data