Back to Teamwork CRMDuplicates a deal
Duplicates a deal and returns it.
Make sure you first read how to work with leads, opportunities, and deals.
The following values are allowed in the include query parameter:
- company.avatar
- company.phoneNumbers.code
- company.timezone
- contacts.avatar
- contacts.company
- contacts.phoneNumbers.code
- contacts.timezone
- createdBy.avatar
- currency
- customFieldEntities.avatar
- lostReason
- wonReason
- mainContact.avatar
- mainContact.timezone
- owner.avatar
- products
- stage.pipeline
Input
type: object
properties:
parameters:
type: object
properties:
include:
type: string
description: |-
Comma separated list of relationships to include in the response.
See
[including related entities](/crm/general/related-entities)
for more detailed documentation of how this works.
id:
type: integer
required:
- id
title: Parameters
Output
type: object
title: dealResponse
properties:
deal:
type: object
title: Deal
properties:
closedAt:
type: string
description: 'Date the deal was closed (state: won/lost).'
format: date-time
company:
type: object
properties:
id:
type: integer
description: The id related entity.
type:
type: string
description: The type of the related entity, e.g "users".
contacts:
type: array
description: >-
Contacts related to the deal.
See the meta description for usage of isMain property and
[Resource objects/entity
models](/crm/general/entity-models#relationships) for more details on
relationships.
items:
type: object
properties:
id:
type: integer
meta:
type: object
properties:
isMain:
type: boolean
description: One element in the array must have this set to true.
type:
type: string
enum:
- contacts
contactsCount:
type: integer
createdAt:
type: string
description: When the item was created, as a datetime
format: date-time
createdBy:
type: object
properties:
id:
type: integer
type:
type: string
enum:
- users
currency:
type: object
properties:
id:
type: integer
description: The id related entity.
type:
type: string
description: The type of the related entity, e.g "users".
custom:
type: object
customValue:
type: integer
description: |-
Custom value of the deal, this is combined with the products prices to
calculate the totalValue of the deal.
deletedAt:
type: string
description: When the item was deleted, as a datetime
format: date-time
deletedBy:
type: object
properties:
id:
type: integer
type:
type: string
enum:
- users
duplicatedFrom:
type: object
properties:
id:
type: integer
description: The id related entity.
type:
type: string
description: The type of the related entity, e.g "deals".
expectedCloseDate:
type: string
format: date-time
foreignItemLinks:
type: object
id:
type: integer
isQualified:
type: boolean
description: |-
Qualified is true if the deal is linked to a stage whose pipeline has
the isQualified attribute set to true.
lostReason:
type: object
properties:
id:
type: integer
description: The id related entity.
type:
type: string
description: The type of the related entity, e.g "users".
nextIncompleteActivity:
type: object
properties:
id:
type: integer
description: The id related entity.
type:
type: string
description: The type of the related entity, e.g "users".
owner:
type: object
properties:
id:
type: integer
description: The id related entity.
type:
type: string
description: The type of the related entity, e.g "users".
products:
type: array
description: >-
Products related to the deal and their prices, no duplicates allowed.
See the meta description for more info on price and
[Resource objects/entity
models](/crm/general/entity-models#relationships) for more details on
relationships.
items:
type: object
properties:
id:
type: integer
meta:
type: object
properties:
discount:
type: number
description: Discount to apply to the price.
price:
type: integer
description: >-
Price of the product in the same currency as the deal in its
lowest denomination, e.g for USD the value in cents.
quantity:
type: integer
description: Quantity of this product at the price with discount.
type:
type: string
enum:
- products
qualifiedAt:
type: string
format: date-time
qualifiedBy:
type: object
properties:
id:
type: integer
description: The id related entity.
type:
type: string
description: The type of the related entity, e.g "users".
rottingSince:
type: string
description: |-
The time at which the deal started rotting in the stage, this is
calculated based on the stages rottingDuration, the last time the
deal was interacted with and the next planned activity.
format: date-time
stage:
type: object
properties:
id:
type: integer
description: The id related entity.
type:
type: string
description: The type of the related entity, e.g "users".
state:
type: string
description: State of the deal.
enum:
- open
- lost
- won
teamworkProjects:
type: object
title:
type: string
totalValue:
type: integer
description: |-
Total value of the deal in your currency. This is the customValue of
the deal plus the sum of all its products prices.
updatedAt:
type: string
description: When the item was last updated, as a datetime
format: date-time
updatedBy:
type: object
properties:
id:
type: integer
type:
type: string
enum:
- users
updatedSourceId:
type: integer
description: Source ID of the latest request made (API / Web app)
wonReason:
type: object
properties:
id:
type: integer
description: The id related entity.
type:
type: string
description: The type of the related entity, e.g "users".
included:
type: object
title: Included
meta:
type: object
title: dealResponseMeta
properties:
stageDurations:
type: object