openapi: 3.2.0 info: title: CRM Pipelines API version: 0.157.0 servers: - description: Production url: https://prod.apigateway.co/grpc tags: - name: Pipelines paths: /v1/crm/pipeline/create: post: operationId: Pipelines_CreatePipeline requestBody: content: application/json: schema: $ref: '#/components/schemas/v1CreatePipelineRequest' description: Request to create a new pipeline within a namespace. required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/v1CreatePipelineResponse' description: A successful response. default: content: application/json: schema: $ref: '#/components/schemas/rpcStatus' description: An unexpected error response. security: - OAuth2: - crm - crm.opportunity - crm.company - crm.contact summary: Create Pipeline tags: - Pipelines /v1/crm/pipeline/delete: post: operationId: Pipelines_DeletePipeline requestBody: content: application/json: schema: $ref: '#/components/schemas/v1DeletePipelineRequest' description: Request to delete a pipeline within a namespace. required: true responses: '200': content: application/json: schema: type: object description: A successful response. default: content: application/json: schema: $ref: '#/components/schemas/rpcStatus' description: An unexpected error response. security: - OAuth2: - crm - crm.opportunity - crm.company - crm.contact summary: Delete Pipeline tags: - Pipelines /v1/crm/pipeline/get-multi: post: operationId: Pipelines_GetMultiPipeline requestBody: content: application/json: schema: $ref: '#/components/schemas/v1GetMultiPipelineRequest' description: Request to retrieve multiple pipelines by their IDs within a namespace. required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/v1GetMultiPipelineResponse' description: A successful response. default: content: application/json: schema: $ref: '#/components/schemas/rpcStatus' description: An unexpected error response. security: - OAuth2: - crm - crm.opportunity - crm.opportunity:read - crm.company - crm.company:read - crm.contact - crm.contact:read summary: Get Multi Pipeline tags: - Pipelines /v1/crm/pipeline/list: post: operationId: Pipelines_ListPipelines requestBody: content: application/json: schema: $ref: '#/components/schemas/v1ListPipelinesRequest' description: Request to list pipelines within a namespace, optionally filtered by object type. required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/v1ListPipelinesResponse' description: A successful response. default: content: application/json: schema: $ref: '#/components/schemas/rpcStatus' description: An unexpected error response. security: - OAuth2: - crm - crm.opportunity - crm.opportunity:read - crm.company - crm.company:read - crm.contact - crm.contact:read summary: List Pipelines tags: - Pipelines /v1/crm/pipeline/update: post: operationId: Pipelines_UpdatePipeline requestBody: content: application/json: schema: $ref: '#/components/schemas/v1UpdatePipelineRequest' description: Request to update an existing pipeline. Use the field mask to specify which fields to update. required: true responses: '200': content: application/json: schema: type: object description: A successful response. default: content: application/json: schema: $ref: '#/components/schemas/rpcStatus' description: An unexpected error response. security: - OAuth2: - crm - crm.opportunity - crm.company - crm.contact summary: Update Pipeline tags: - Pipelines components: schemas: rpcStatus: properties: code: format: int32 type: integer details: items: $ref: '#/components/schemas/protobufAny' type: array message: type: string type: object v1UpdatePipelineRequest: description: Request to update an existing pipeline. Use the field mask to specify which fields to update. properties: fieldMask: $ref: '#/components/schemas/vendastatypesFieldMask' pipeline: $ref: '#/components/schemas/v1Pipeline' required: - pipeline title: Update Pipeline Request type: object v1GetMultiPipelineResponse: description: Response containing the requested pipelines. properties: pipelines: description: Output only. The retrieved pipelines. items: $ref: '#/components/schemas/v1Pipeline' readOnly: true type: array title: Get Multi Pipeline Response type: object v1ListPipelinesResponse: description: Response containing the pipelines matching the request criteria. properties: pipelines: description: Output only. The pipelines matching the request criteria. items: $ref: '#/components/schemas/v1Pipeline' readOnly: true type: array title: List Pipelines Response type: object vendastatypesFieldMask: description: "paths: \"f.a\"\n paths: \"f.b.d\"\n\nHere `f` represents a field in some root message, `a` and `b`\nfields in the message found in `f`, and `d` a field found in the\nmessage in `f.b`.\n\nField masks are used to specify a subset of fields that should be\nreturned by a get operation or modified by an update operation.\nField masks also have a custom JSON encoding (see below).\n\n# Field Masks in Projections\n\nWhen used in the context of a projection, a response message or\nsub-message is filtered by the API to only contain those fields as\nspecified in the mask. For example, if the mask in the previous\nexample is applied to a response message as follows:\n\n f {\n a : 22\n b {\n d : 1\n x : 2\n }\n y : 13\n }\n z: 8\n\nThe result will not contain specific values for fields x,y and z\n(their value will be set to the default, and omitted in proto text\noutput):\n\n\n f {\n a : 22\n b {\n d : 1\n }\n }\n\nA repeated field is not allowed except at the last position of a\npaths string.\n\nIf a FieldMask object is not present in a get operation, the\noperation applies to all fields (as if a FieldMask of all fields\nhad been specified).\n\nNote that a field mask does not necessarily apply to the\ntop-level response message. In case of a REST get operation, the\nfield mask applies directly to the response, but in case of a REST\nlist operation, the mask instead applies to each individual message\nin the returned resource list. In case of a REST custom method,\nother definitions may be used. Where the mask applies will be\nclearly documented together with its declaration in the API. In\nany case, the effect on the returned resource/resources is required\nbehavior for APIs.\n\n# Field Masks in Update Operations\n\nA field mask in update operations specifies which fields of the\ntargeted resource are going to be updated. The API is required\nto only change the values of the fields as specified in the mask\nand leave the others untouched. If a resource is passed in to\ndescribe the updated values, the API ignores the values of all\nfields not covered by the mask.\n\nIf a repeated field is specified for an update operation, the existing\nrepeated values in the target resource will be overwritten by the new values.\nNote that a repeated field is only allowed in the last position of a `paths`\nstring.\n\nIf a sub-message is specified in the last position of the field mask for an\nupdate operation, then the existing sub-message in the target resource is\noverwritten. Given the target message:\n\n f {\n b {\n d : 1\n x : 2\n }\n c : 1\n }\n\nAnd an update message:\n\n f {\n b {\n d : 10\n }\n }\n\nthen if the field mask is:\n\n paths: \"f.b\"\n\nthen the result will be:\n\n f {\n b {\n d : 10\n }\n c : 1\n }\n\nHowever, if the update mask was:\n\n paths: \"f.b.d\"\n\nthen the result would be:\n\n f {\n b {\n d : 10\n x : 2\n }\n c : 1\n }\n\nIn order to reset a field's value to the default, the field must\nbe in the mask and set to the default value in the provided resource.\nHence, in order to reset all fields of a resource, provide a default\ninstance of the resource and set all fields in the mask, or do\nnot provide a mask as described below.\n\nIf a field mask is not present on update, the operation applies to\nall fields (as if a field mask of all fields has been specified).\nNote that in the presence of schema evolution, this may mean that\nfields the client does not know and has therefore not filled into\nthe request will be reset to their default. If this is unwanted\nbehavior, a specific service may require a client to always specify\na field mask, producing an error if not.\n\nAs with get operations, the location of the resource which\ndescribes the updated values in the request message depends on the\noperation kind. In any case, the effect of the field mask is\nrequired to be honored by the API.\n\n## Considerations for HTTP REST\n\nThe HTTP kind of an update operation which uses a field mask must\nbe set to PATCH instead of PUT in order to satisfy HTTP semantics\n(PUT must only be used for full updates).\n\n# JSON Encoding of Field Masks\n\nIn JSON, a field mask is encoded as a single string where paths are\nseparated by a comma. Fields name in each path are converted\nto/from lower-camel naming conventions.\n\nAs an example, consider the following message declarations:\n\n message Profile {\n User user = 1;\n Photo photo = 2;\n }\n message User {\n string display_name = 1;\n string address = 2;\n }\n\nIn proto a field mask for `Profile` may look as such:\n\n mask {\n paths: \"user.display_name\"\n paths: \"photo\"\n }\n\nIn JSON, the same mask is represented as below:\n\n {\n mask: \"user.displayName,photo\"\n }\n\n# Field Masks and Oneof Fields\n\nField masks treat fields in oneofs just as regular fields. Consider the\nfollowing message:\n\n message SampleMessage {\n oneof test_oneof {\n string name = 4;\n SubMessage sub_message = 9;\n }\n }\n\nThe field mask can be:\n\n mask {\n paths: \"name\"\n }\n\nOr:\n\n mask {\n paths: \"sub_message\"\n }\n\nNote that oneof type names (\"test_oneof\" in this case) cannot be used in\npaths." properties: paths: description: The set of field mask paths. items: type: string type: array title: '`FieldMask` represents a set of symbolic field paths, for example:' type: object v1GetMultiPipelineRequest: description: Request to retrieve multiple pipelines by their IDs within a namespace. properties: namespace: description: Required. The namespace (account group ID) the pipelines belong to. type: string pipelineIds: description: Required. The identifiers of the pipelines to retrieve. items: type: string type: array required: - namespace - pipelineIds title: Get Multi Pipeline Request type: object v1FilterValue: properties: boolean: type: boolean date: format: date-time type: string dateDefault: $ref: '#/components/schemas/v1DateDefault' float: format: float type: number integer: format: int64 type: string phone: $ref: '#/components/schemas/v1Phone' string: type: string type: object v1CreatePipelineRequest: description: Request to create a new pipeline within a namespace. properties: pipeline: $ref: '#/components/schemas/v1Pipeline' required: - pipeline title: Create Pipeline Request type: object v1PhoneFields: properties: e164Compliant: title: This flags signals if the number is compliant with the E164 format type: boolean extension: title: An extension number type: string isoCountryCode: title: ISO country code is the 2 or 3 letter code for the country, example 'CA' for Canada type: string nationalNumber: title: The main phone number without the country code type: string type: object v1ListOptions: properties: crmObjectSubtype: description: Optional. The custom object subtype to filter by. Only relevant when `object_type` refers to a custom object type. type: string namespace: description: Required. The namespace (account group ID) to list pipelines for. type: string objectType: description: Optional. The CRM object type to filter pipelines by. Valid values include "Contact", "Company", "Opportunity", and custom object type IDs. type: string required: - namespace type: object v1Geopoint: properties: lat: format: double title: Latitude type: number lon: format: double title: Longitude type: number title: Values for geo-location type: object v1FilterGroupOperator: default: FILTER_GROUP_OPERATOR_INVALID enum: - FILTER_GROUP_OPERATOR_INVALID - FILTER_GROUP_OPERATOR_AND - FILTER_GROUP_OPERATOR_OR type: string v1Phone: properties: extension: type: string isoCountryCode: title: ISO country code is the 2 or 3 letter code for the country, example 'CA' for Canada type: string nationalNumber: type: string title: This follows the E164 international standard specification for phone numbers type: object v1ListPipelinesRequest: description: Request to list pipelines within a namespace, optionally filtered by object type. properties: listOptions: $ref: '#/components/schemas/v1ListOptions' required: - listOptions title: List Pipelines Request type: object v1Pipeline: description: A structured representation of a sales or business process, tracking CRM objects through defined stages from start to finish. properties: crmObjectSubtype: description: Optional. The custom object subtype this pipeline tracks. Only relevant when `object_type` refers to a custom object type. type: string name: description: Required. The display name of the pipeline. type: string namespace: description: Required. The namespace (account group ID) the pipeline belongs to. type: string objectType: description: Required. The CRM object type this pipeline tracks. Valid values include "Contact", "Company", "Opportunity", and custom object type IDs. type: string pipelineId: description: The unique identifier of the pipeline. Assigned by the system on create; must be provided on update. type: string stages: description: Required. The ordered list of stages in this pipeline. items: $ref: '#/components/schemas/v1Stage' type: array required: - namespace - name - objectType - stages title: Pipeline type: object v1FilterGroup: properties: filters: items: $ref: '#/components/schemas/v1Filter' type: array operator: $ref: '#/components/schemas/v1FilterGroupOperator' type: object v1StringList: properties: values: items: type: string title: A list of values of type string type: array type: object v1Currency: properties: currencyCode: title: ISO 4217 currency code type: string value: format: double title: Amount type: number type: object v1CreatePipelineResponse: description: Response containing the identifier of the newly created pipeline. properties: pipelineId: description: Output only. The unique identifier of the newly created pipeline. readOnly: true type: string title: Create Pipeline Response type: object v1DateDefault: default: DATE_DEFAULT_INVALID enum: - DATE_DEFAULT_INVALID - DATE_DEFAULT_TODAY - DATE_DEFAULT_YESTERDAY - DATE_DEFAULT_TOMORROW - DATE_DEFAULT_THIS_WEEK - DATE_DEFAULT_LAST_WEEK - DATE_DEFAULT_NEXT_WEEK - DATE_DEFAULT_THIS_MONTH - DATE_DEFAULT_LAST_MONTH - DATE_DEFAULT_NEXT_MONTH - DATE_DEFAULT_THIS_QUARTER - DATE_DEFAULT_LAST_QUARTER - DATE_DEFAULT_NEXT_QUARTER - DATE_DEFAULT_THIS_YEAR - DATE_DEFAULT_LAST_YEAR - DATE_DEFAULT_NEXT_YEAR type: string v1Filter: properties: fieldId: type: string floatTolerance: format: float type: number operator: $ref: '#/components/schemas/v1FilterOperator' values: items: $ref: '#/components/schemas/v1FilterValue' title: "This is repeated to support operations that take zero or more than one value.\nFor example\n isEmpty()\n isAnyOf(a, b, c)\n isBetween(date1, date2)" type: array type: object protobufAny: additionalProperties: {} properties: '@type': type: string type: object v1FieldValue: description: 'FieldValue represents one of the fields of a crm object (Contact, Company, etc...) On Create/Update we need the field_id or external_id filled, with the field_id taking precedence over external_id. When retrieving both field_id and external_id will be returned.' properties: booleanValue: title: A boolean value type: boolean currencyValue: $ref: '#/components/schemas/v1Currency' dateValue: format: date-time title: A timestamp value type: string externalId: title: An external identifier for the field, not required type: string fieldId: title: The identifier of the field type: string floatValue: format: float title: A float number value type: number geopointValue: $ref: '#/components/schemas/v1Geopoint' integerValue: format: int64 title: An Integer value type: string nullValue: title: Empty value type: string phoneFieldValues: $ref: '#/components/schemas/v1PhoneFields' stringValue: title: A string value type: string stringValues: $ref: '#/components/schemas/v1StringList' type: object v1DeletePipelineRequest: description: Request to delete a pipeline within a namespace. properties: namespace: description: Required. The namespace (account group ID) the pipeline belongs to. type: string pipelineId: description: Required. The identifier of the pipeline to delete. type: string required: - namespace - pipelineId title: Delete Pipeline Request type: object v1Stage: description: Represents a single stage within a pipeline, including the filter criteria that determine object membership and mutations applied on stage entry. properties: filterGroup: $ref: '#/components/schemas/v1FilterGroup' mutations: description: Optional. Field value mutations applied to an object when it enters this stage, ensuring it satisfies the stage filters. items: $ref: '#/components/schemas/v1FieldValue' type: array name: description: Required. The display name of the stage. type: string stageId: description: Required. The unique identifier of the stage within its pipeline. type: string required: - stageId - name title: Stage type: object v1FilterOperator: default: FILTER_OPERATOR_INVALID enum: - FILTER_OPERATOR_INVALID - FILTER_OPERATOR_IS_EMPTY - FILTER_OPERATOR_IS_NOT_EMPTY - FILTER_OPERATOR_IS - FILTER_OPERATOR_IS_NOT - FILTER_OPERATOR_IS_ANY - FILTER_OPERATOR_IS_NOT_ANY - FILTER_OPERATOR_IS_ALL - FILTER_OPERATOR_IS_NOT_ALL - FILTER_OPERATOR_CONTAINS - FILTER_OPERATOR_DOES_NOT_CONTAIN - FILTER_OPERATOR_IS_EQUAL_TO - FILTER_OPERATOR_IS_NOT_EQUAL_TO - FILTER_OPERATOR_IS_GREATER_THAN - FILTER_OPERATOR_IS_GREATER_THAN_OR_EQUAL_TO - FILTER_OPERATOR_IS_LESS_THAN - FILTER_OPERATOR_IS_LESS_THAN_OR_EQUAL_TO - FILTER_OPERATOR_IS_BEFORE - FILTER_OPERATOR_IS_BEFORE_OR_ON - FILTER_OPERATOR_IS_AFTER - FILTER_OPERATOR_IS_AFTER_OR_ON - FILTER_OPERATOR_IS_BETWEEN - FILTER_OPERATOR_IS_NOT_BETWEEN - FILTER_OPERATOR_IS_VALID - FILTER_OPERATOR_IS_NOT_VALID - FILTER_OPERATOR_ANNIVERSARY_IS type: string securitySchemes: OAuth2: flows: authorizationCode: authorizationUrl: https://sso-api-prod.apigateway.co/oauth2/auth scopes: crm: Allows the application to manage all data in your CRM crm.association: Allows the application to manage associations in your CRM crm.association:read: Allows the application view-only access to associations in your CRM crm.company: Allows the application to manage your CRM companies crm.company:read: Allows the application view-only access to CRM companies crm.contact: Allows the application to manage your CRM contacts crm.contact:read: Allows the application view-only access to CRM contacts crm.custom-object: Allows the application to manage your CRM custom objects crm.custom-object:read: Allows the application view-only access to CRM custom objects crm.opportunity: Allows the application to manage your CRM opportunities crm.opportunity:read: Allows the application view-only access to CRM opportunities crm.schema: Allows the application to manage your CRM object schemas crm.schema:read: Allows the application view-only access to CRM object schemas tokenUrl: https://sso-api-prod.apigateway.co/oauth2/token type: oauth2