lib/swagger/external/crm-vernonkeenan.yaml

823 lines
22 KiB
YAML
Raw Normal View History

2022-09-07 00:16:25 +00:00
swagger: "2.0"
info:
2023-04-06 01:28:58 +00:00
version: 0.3.4
2022-09-07 00:16:25 +00:00
title: "crm"
description: "Customer Information Microservice"
2023-03-28 17:47:34 +00:00
termsOfService: "https://salesforcedevops.net/terms/"
2022-09-07 00:16:25 +00:00
contact:
2023-03-28 17:47:34 +00:00
email: "vern@vernonkeenan.com"
2022-09-07 00:16:25 +00:00
license:
2023-03-28 17:47:34 +00:00
name: "Proprietary - Copyright (c) 2018-2023 by Vernon Keenan"
2022-09-07 00:16:25 +00:00
securityDefinitions:
ApiKeyAuth:
type: "apiKey"
in: "header"
name: "X-API-Key"
schemes:
- "https"
basePath: "/vk/crm/v1"
host: "gw.tnxs.net"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
accountIdQuery:
2023-03-28 17:47:34 +00:00
description: Record Id of an Account
2022-09-07 00:16:25 +00:00
in: query
name: accountId
required: false
type: string
assetIdQuery:
2023-03-28 17:47:34 +00:00
description: Record Id of an Asset
2022-09-07 00:16:25 +00:00
in: query
name: assetId
required: false
type: string
accountRequest:
description: An array of new Account records
in: body
name: accountRequest
required: true
schema:
$ref: "#/definitions/AccountRequest"
assetRequest:
description: An array of new Asset records
in: body
name: assetRequest
required: true
schema:
$ref: "#/definitions/AssetRequest"
activeQuery:
description: Only retrieve active records?
in: query
name: active
required: false
type: boolean
companyIdQuery:
2023-03-28 17:47:34 +00:00
description: Company record ID
2022-09-07 00:16:25 +00:00
in: query
name: companyId
required: false
type: string
leadIdQuery:
2023-03-28 17:47:34 +00:00
description: Lead record ID
2022-09-07 00:16:25 +00:00
in: query
name: leadId
required: false
type: string
contactIdQuery:
2023-03-28 17:47:34 +00:00
description: Contact record ID
2022-09-07 00:16:25 +00:00
in: query
name: contactId
required: false
type: string
contractIdQuery:
2023-03-28 17:47:34 +00:00
description: Contact record ID
2022-09-07 00:16:25 +00:00
in: query
name: contractId
required: false
type: string
emailQuery:
description: Email address used for identity lookup
in: query
name: email
required: false
type: string
contactRequest:
description: An array of new Contact records
in: body
name: contactsRequest
required: true
schema:
$ref: "#/definitions/ContactRequest"
contractRequest:
description: An array of new Contract records
in: body
name: contractsRequest
required: true
schema:
$ref: "#/definitions/ContractRequest"
leadRequest:
description: An array of new Lead records
in: body
name: leadRequest
required: true
schema:
$ref: "#/definitions/LeadRequest"
limitQuery:
description: "How many objects to return at one time"
format: int64
in: query
name: limit
required: false
type: integer
nameQuery:
description: The Name of this Object
in: query
name: name
required: false
type: string
offsetQuery:
description: How many objects to skip?
format: int64
in: query
name: offset
required: false
type: integer
2023-04-07 00:34:49 +00:00
slugQuery:
description: The Slug of this Object
in: query
name: slug
required: false
type: string
2022-09-07 00:16:25 +00:00
typeQuery:
description: The Type of this Object
in: query
name: type
required: false
type: string
responses:
AccessForbidden:
description: "Access forbidden, account lacks access"
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/Error"
AccountResponse:
2023-03-28 17:47:34 +00:00
description: Response with Account objects with Contacts
2022-09-07 00:16:25 +00:00
headers:
Access-Control-Allow-Origin:
type: string
Cache-Control:
type: string
schema:
$ref: "#/definitions/AccountResponse"
AssetResponse:
2023-03-28 17:47:34 +00:00
description: Response with Asset objects with Contacts
2022-09-07 00:16:25 +00:00
headers:
Access-Control-Allow-Origin:
type: string
Cache-Control:
type: string
schema:
$ref: "#/definitions/AssetResponse"
Conflict:
description: Conflict
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/Error"
ContactResponse:
2023-03-28 17:47:34 +00:00
description: Response with an array of Contact objects
2022-09-07 00:16:25 +00:00
headers:
Access-Control-Allow-Origin:
type: string
Cache-Control:
type: string
schema:
$ref: "#/definitions/ContactResponse"
ContractResponse:
2023-03-28 17:47:34 +00:00
description: Response with an array of Contract objects
2022-09-07 00:16:25 +00:00
headers:
Access-Control-Allow-Origin:
type: string
Cache-Control:
type: string
schema:
$ref: "#/definitions/ContractResponse"
LeadResponse:
2023-03-28 17:47:34 +00:00
description: Response with an array of Lead objects
2022-09-07 00:16:25 +00:00
headers:
Access-Control-Allow-Origin:
type: string
Cache-Control:
type: string
schema:
$ref: "#/definitions/LeadResponse"
DeleteResponse:
2023-03-28 17:47:34 +00:00
description: Response with Message Objects with Delete Status
2022-09-07 00:16:25 +00:00
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/DeleteResponse"
InvalidDataError:
headers:
Access-Control-Allow-Origin:
type: string
description: Invalid data was sent
schema:
$ref: "#/definitions/InvalidError"
NotFound:
description: Resource was not found
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/Error"
ServerError:
description: Server Internal Error
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/Error"
Unauthorized:
description: "Access unauthorized, invalid API-KEY was used"
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/Error"
UnprocessableEntity:
description: "Unprocessable Entity, likely a bad parameter"
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/Error"
paths:
/accounts:
delete:
description: Delete SalesforceDevops.net Account record
2022-09-07 00:16:25 +00:00
operationId: deleteAccount
parameters:
- $ref: "#/parameters/accountIdQuery"
responses:
"200":
$ref: "#/responses/DeleteResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Delete An Account
tags:
- Accounts
get:
description: Return a list of all available Accounts
operationId: getAccounts
parameters:
- $ref: "#/parameters/limitQuery"
- $ref: "#/parameters/nameQuery"
- $ref: "#/parameters/offsetQuery"
- $ref: "#/parameters/activeQuery"
- $ref: "#/parameters/accountIdQuery"
2023-04-07 00:34:49 +00:00
- $ref: "#/parameters/slugQuery"
2022-09-07 00:16:25 +00:00
responses:
"200":
$ref: "#/responses/AccountResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Get a list of accounts
tags:
- Accounts
post:
description: Account record to be added
operationId: postAccounts
parameters:
- $ref: "#/parameters/accountRequest"
responses:
"200":
$ref: "#/responses/AccountResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Add a new account to SalesforceDevops.net
2022-09-07 00:16:25 +00:00
tags:
- Accounts
put:
2023-04-15 14:27:18 +00:00
description: Update one or more accounts
operationId: putAccounts
2022-09-07 00:16:25 +00:00
parameters:
- $ref: "#/parameters/accountRequest"
responses:
"200":
$ref: "#/responses/AccountResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Update a single account
tags:
- Accounts
/assets:
delete:
description: Delete SalesforceDevops.net Asset record
2022-09-07 00:16:25 +00:00
operationId: deleteAsset
parameters:
- $ref: "#/parameters/assetIdQuery"
responses:
"200":
$ref: "#/responses/DeleteResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Delete An Asset
tags:
- Assets
get:
description: Return a list of all available Assets
operationId: getAssets
parameters:
- $ref: "#/parameters/limitQuery"
- $ref: "#/parameters/offsetQuery"
- $ref: "#/parameters/accountIdQuery"
- $ref: "#/parameters/assetIdQuery"
responses:
"200":
$ref: "#/responses/AssetResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Get a list of assets
tags:
- Assets
post:
description: Asset record to be added
operationId: postAssets
parameters:
- $ref: "#/parameters/assetRequest"
responses:
"200":
$ref: "#/responses/AssetResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Add a new asset to SalesforceDevops.net
2022-09-07 00:16:25 +00:00
tags:
- Assets
put:
description: Update a single asset specified by assetId
operationId: putAsset
parameters:
- $ref: "#/parameters/assetRequest"
responses:
"200":
$ref: "#/responses/AssetResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Update a single asset
tags:
- Assets
/contracts:
delete:
description: Delete SalesforceDevops.net Contract record
2022-09-07 00:16:25 +00:00
operationId: deleteContract
parameters:
- $ref: "#/parameters/contractIdQuery"
responses:
"200":
$ref: "#/responses/DeleteResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Delete An Contract
tags:
- Contracts
get:
description: Return a list of all available Contracts
operationId: getContracts
parameters:
- $ref: "#/parameters/limitQuery"
- $ref: "#/parameters/offsetQuery"
- $ref: "#/parameters/activeQuery"
- $ref: "#/parameters/contractIdQuery"
responses:
"200":
$ref: "#/responses/ContractResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Get a list of contracts
tags:
- Contracts
post:
description: Contract record to be added
operationId: postContracts
parameters:
- $ref: "#/parameters/contractRequest"
responses:
"200":
$ref: "#/responses/ContractResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Add a new contract to SalesforceDevops.net
2022-09-07 00:16:25 +00:00
tags:
- Contracts
put:
description: Update a single contract specified by contractId
operationId: putContract
parameters:
- $ref: "#/parameters/contractRequest"
responses:
"200":
$ref: "#/responses/ContractResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Update a single contract
tags:
- Contracts
/contacts:
delete:
description: Delete SalesforceDevops.net Contact record
2022-09-07 00:16:25 +00:00
operationId: deleteContact
parameters:
- $ref: "#/parameters/contactIdQuery"
responses:
"200":
$ref: "#/responses/DeleteResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Delete a Contact
tags:
- Contacts
get:
description: Return a list of all available Contacts
operationId: getContacts
parameters:
- $ref: "#/parameters/limitQuery"
- $ref: "#/parameters/offsetQuery"
- $ref: "#/parameters/contactIdQuery"
- $ref: "#/parameters/activeQuery"
2023-04-07 00:34:49 +00:00
- $ref: "#/parameters/slugQuery"
2022-09-07 00:16:25 +00:00
- $ref: "#/parameters/emailQuery"
responses:
"200":
$ref: "#/responses/ContactResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Get a list of contacts
tags:
- Contacts
post:
description: Contact record to be added
operationId: postContacts
parameters:
- $ref: "#/parameters/contactRequest"
responses:
"200":
$ref: "#/responses/ContactResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Add new contacts
tags:
- Contacts
put:
description: Update Contact records
operationId: putContacts
parameters:
- $ref: "#/parameters/contactRequest"
responses:
"200":
$ref: "#/responses/ContactResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Update Contact
tags:
- Contacts
/leads:
delete:
description: Delete SalesforceDevops.net Lead record
2022-09-07 00:16:25 +00:00
operationId: deleteLead
parameters:
- $ref: "#/parameters/leadIdQuery"
responses:
"200":
$ref: "#/responses/DeleteResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Delete a Contact
tags:
- Leads
get:
description: Return a list of all available Leads
operationId: getLeads
parameters:
- $ref: "#/parameters/limitQuery"
- $ref: "#/parameters/offsetQuery"
- $ref: "#/parameters/leadIdQuery"
- $ref: "#/parameters/emailQuery"
- $ref: "#/parameters/nameQuery"
responses:
"200":
$ref: "#/responses/LeadResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Get a list of contacts
tags:
- Leads
post:
description: Lead records to be added
operationId: postLeads
parameters:
- $ref: "#/parameters/leadRequest"
responses:
"200":
$ref: "#/responses/LeadResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Add new Leads
tags:
- Leads
put:
description: Update Lead records
operationId: putLeads
parameters:
- $ref: "#/parameters/leadRequest"
responses:
"200":
$ref: "#/responses/LeadResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Update Leads
tags:
- Leads
definitions:
AccountRequest:
description: An array of Account objects with Contacts
properties:
Data:
items:
2023-04-06 01:28:58 +00:00
$ref: "../../lib/swagger/defs/account.yaml#/Account"
2022-09-07 00:16:25 +00:00
type: array
type: object
AccountResponse:
description: An array of Account objects with Contacts
properties:
Data:
items:
2023-04-06 01:28:58 +00:00
$ref: "../../lib/swagger/defs/account.yaml#/Account"
2022-09-07 00:16:25 +00:00
type: array
Meta:
2023-04-06 01:28:58 +00:00
$ref: "../../lib/swagger/defs/response-meta.yaml#/ResponseMeta"
2022-09-07 00:16:25 +00:00
type: object
AssetRequest:
description: An array of Asset objects with Contacts
properties:
Data:
items:
2023-04-06 01:28:58 +00:00
$ref: "../../lib/swagger/defs/asset.yaml#/Asset"
2022-09-07 00:16:25 +00:00
type: array
type: object
AssetResponse:
description: An array of Asset objects with Contacts
properties:
Data:
items:
2023-04-06 01:28:58 +00:00
$ref: "../../lib/swagger/defs/asset.yaml#/Asset"
2022-09-07 00:16:25 +00:00
type: array
Meta:
2023-04-06 01:28:58 +00:00
$ref: "../../lib/swagger/defs/response-meta.yaml#/ResponseMeta"
2022-09-07 00:16:25 +00:00
type: object
ContactRequest:
properties:
Data:
items:
2023-04-06 01:28:58 +00:00
$ref: "../../lib/swagger/defs/contact.yaml#/Contact"
2022-09-07 00:16:25 +00:00
type: array
type: object
ContactResponse:
properties:
Data:
items:
2023-04-06 01:28:58 +00:00
$ref: "../../lib/swagger/defs/contact.yaml#/Contact"
2022-09-07 00:16:25 +00:00
type: array
Meta:
2023-04-06 01:28:58 +00:00
$ref: "../../lib/swagger/defs/response-meta.yaml#/ResponseMeta"
2022-09-07 00:16:25 +00:00
type: object
ContractRequest:
properties:
Data:
items:
2023-04-06 01:28:58 +00:00
$ref: "../../lib/swagger/defs/contract.yaml#/Contract"
2022-09-07 00:16:25 +00:00
type: array
type: object
ContractResponse:
properties:
Data:
items:
2023-04-06 01:28:58 +00:00
$ref: "../../lib/swagger/defs/contract.yaml#/Contract"
2022-09-07 00:16:25 +00:00
type: array
Meta:
2023-04-06 01:28:58 +00:00
$ref: "../../lib/swagger/defs/response-meta.yaml#/ResponseMeta"
2022-09-07 00:16:25 +00:00
type: object
DeleteResponse:
2023-04-06 01:28:58 +00:00
$ref: "../../lib/swagger/defs/delete-response.yaml#/DeleteResponse"
2022-09-07 00:16:25 +00:00
Error:
2023-04-06 01:28:58 +00:00
$ref: "../../lib/swagger/defs/error.yaml#/Error"
2022-09-07 00:16:25 +00:00
InvalidError:
2023-04-06 01:28:58 +00:00
$ref: "../../lib/swagger/defs/invalid-error.yaml#/InvalidError"
2022-09-07 00:16:25 +00:00
LeadRequest:
properties:
Data:
items:
2023-04-06 01:28:58 +00:00
$ref: "../../lib/swagger/defs/lead.yaml#/Lead"
2022-09-07 00:16:25 +00:00
type: array
type: object
LeadResponse:
properties:
Data:
items:
2023-04-06 01:28:58 +00:00
$ref: "../../lib/swagger/defs/lead.yaml#/Lead"
2022-09-07 00:16:25 +00:00
type: array
Meta:
2023-04-06 01:28:58 +00:00
$ref: "../../lib/swagger/defs/response-meta.yaml#/ResponseMeta"
2022-09-07 00:16:25 +00:00
type: object
Message:
2023-04-06 01:28:58 +00:00
$ref: "../../lib/swagger/defs/message.yaml#/Message"
2022-09-07 00:16:25 +00:00
RequestMeta:
2023-04-06 01:28:58 +00:00
$ref: "../../lib/swagger/defs/request-meta.yaml#/RequestMeta"