Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API to create a case #848

Open
franck-boullier opened this issue Jul 8, 2019 · 1 comment
Open

API to create a case #848

franck-boullier opened this issue Jul 8, 2019 · 1 comment
Labels
API All issues and features related to APIs Feature A feature request or description

Comments

@franck-boullier
Copy link
Member

How it should work:

  • 3rd party calls an endpoint

Input:

  • MEFE Unit ID: the MEFE Id for the unit.
  • API Key for the User reporting the case (Reporter)
  • Case Title
  • Case Description (optional)
  • Case Category (Optional): one of the valid case category. See API to return possible case types and case categories #846 on how to get the list of active Category.
  • Case Type (Optional): One of the active case types for the case category that has been selected. See API to return possible case types and case categories #846 on how to get the list of active Case Types.
  • Role: One of the roles that the user is allowed to see for this unit.
  • Assignee (Optional): The API key for the user that needs to be assigned to this case. It could be the Reporter or another API key for another user if needed.

Response:

Success:

  • Case number.

Error:

Meaningful error message.

@franck-boullier franck-boullier added Feature A feature request or description API All issues and features related to APIs labels Jul 8, 2019
@nbiton
Copy link
Contributor

nbiton commented Jul 18, 2019

The API in its final form will work as follows:

Request

{
	"apiKey": String, // API key for the user who's reporting the case, or for the creator of the user specified by 'reporterId'
        "reporterId": String, // (Optional) The MEFE ID of the user who is assumed as the reporter of this case. The user specified by this attribute must have been created by the user associated with 'apiKey'. This should be used in conjunction with 'reporterAliasId'
        "reporterAliasId": String, // (Optional) The alias ID in the context of the user specified by 'apiKey', of the user assumed as the reporter of this case. Works the same way as 'reporterId' in any other aspect.
	"unitId": String, // (Optional) The MEFE ID of the unit. If this is not provided, 'unitAliasId' is mandatory
        "unitAliasId": String, // (Optional) The alias ID of the unit in the context associated with the user specified by 'apiKey'. If this is not provided, 'unitId' is mandatory
	"title": String, // The title for the case
	"details": String, // (Optional) The details of the case. This shows up as the first comment of the case. If not provided, 'title' is shown as the first comment of the case.
	"assignedRole": String, // Enum of "Tenant", "Owner/Landlord", "Agent", "Management Company" (The "Contractor" role is excluded)
	"category": String, // (Optional) Enum of category types
	"subCategory": String, // (Optional) Enum of sub category types. Each 'category' has its own set of sub category types.
	"assigneeId": String, // (Optional) The MEFE ID of the user who should be the assignee of the case. This should only be used if the desired assignee is not the default assignee for the role specified under 'assignedRole', but one the same roles other members.
        "assigneeAliasId": String // (Optional) The alias ID of the user who'll be assigned to this case, in the context of the user specified by 'apiKey'. Works the same as 'assigneeId' in any other aspect.
}

Response:

{
        "id": Number // The ID of the newly created case
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API All issues and features related to APIs Feature A feature request or description
Projects
None yet
Development

No branches or pull requests

2 participants