-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from TrueSparrowSystems/v0.2.0
Enhancements: Added documentation for new functionalities.
- Loading branch information
Showing
35 changed files
with
1,863 additions
and
256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
openapi: 3.0.3 | ||
info: | ||
title: SalesSparrow Account Tasks API's | ||
description: Following api's will be called from the SalesSparrow application | ||
version: '1.0' | ||
servers: | ||
- url: https://sales.truesparrow.com/api | ||
paths: | ||
/v1/accounts/{account_id}/tasks: | ||
post: | ||
description: Api will create task | ||
parameters: | ||
- name: account_id | ||
in: path | ||
description: Account Id | ||
required: true | ||
schema: | ||
type: string | ||
requestBody: | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
crm_organization_user_id: | ||
type: string | ||
example: '00U1e000003TnVXEA1' | ||
description: | ||
type: string | ||
example: 'Complete remaining task' | ||
due_date: | ||
type: string | ||
format: date | ||
example: '2023-07-21' | ||
required: | ||
- crm_organization_user_id | ||
- description | ||
- due_date | ||
responses: | ||
'201': | ||
description: Success | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
task_id: | ||
type: string | ||
example: "00U1e000003TnVXEA0" | ||
'400': | ||
description: "Bad Request" | ||
content: | ||
application/json: | ||
schema: | ||
$ref: 'Components.yaml#/components/schemas/response_400' | ||
'401': | ||
description: Unauthorized access | ||
content: | ||
application/json: | ||
schema: | ||
$ref: 'Components.yaml#/components/schemas/response_401' | ||
'404': | ||
description: Not Found | ||
content: | ||
application/json: | ||
schema: | ||
$ref: 'Components.yaml#/components/schemas/response_404' | ||
'500': | ||
description: Something went wrong | ||
content: | ||
application/json: | ||
schema: | ||
$ref: 'Components.yaml#/components/schemas/response_500' | ||
|
||
get: | ||
description: Api will return list of tasks for accountId | ||
parameters: | ||
- name: account_id | ||
in: path | ||
description: Account Id | ||
required: true | ||
schema: | ||
type: string | ||
responses: | ||
'200': | ||
description: Success | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
task_ids: | ||
type: array | ||
items: | ||
type: string | ||
example: "00U1e000003TUB8EAO" | ||
task_map_by_id: | ||
type: object | ||
properties: | ||
00U1e000003TUB8EAO: | ||
type: object | ||
properties: | ||
$ref: 'Components.yaml#/components/schemas/task' | ||
'400': | ||
description: "Bad Request" | ||
content: | ||
application/json: | ||
schema: | ||
$ref: 'Components.yaml#/components/schemas/response_400' | ||
'401': | ||
description: Unauthorized access | ||
content: | ||
application/json: | ||
schema: | ||
$ref: 'Components.yaml#/components/schemas/response_401' | ||
'404': | ||
description: Not Found | ||
content: | ||
application/json: | ||
schema: | ||
$ref: 'Components.yaml#/components/schemas/response_404' | ||
'500': | ||
description: Something went wrong | ||
content: | ||
application/json: | ||
schema: | ||
$ref: 'Components.yaml#/components/schemas/response_500' | ||
|
||
/v1/accounts/{account_id}/tasks/{task_id}: | ||
delete: | ||
description: Delete task for the given task id. | ||
parameters: | ||
- name: account_id | ||
description: Account Id | ||
in: path | ||
required: true | ||
schema: | ||
type: string | ||
- name: task_id | ||
description: Task Id | ||
in: path | ||
required: true | ||
schema: | ||
type: string | ||
responses: | ||
'401': | ||
description: Unauthorized access | ||
content: | ||
application/json: | ||
schema: | ||
$ref: 'Components.yaml#/components/schemas/response_401' | ||
'404': | ||
description: Not Found | ||
content: | ||
application/json: | ||
schema: | ||
$ref: 'Components.yaml#/components/schemas/response_404' | ||
'500': | ||
description: Something went wrong | ||
content: | ||
application/json: | ||
schema: | ||
$ref: 'Components.yaml#/components/schemas/response_500' | ||
'204': | ||
description: Success |
Oops, something went wrong.