ποΈDeals
API Endpoints for Deals
List Deals GET
Endpoint: https://subdomain.appcrm.com.br/api/deals
Headers
Content-Type
Required
string
application/json
Accept
Required
string
application/json
Authorization
Required
string
Bearer {token}
Query Parameters
order
Optional
string
Sort the results being queried.
Example: ?order=created_at or ?order=created_at|desc
select
Optional
string
Select only the provided fields, useful for query optimization.
Example: ?select=first_name;id
per_page
Optional
integer
Provide the total number of records to query per page.
Example: ?per_page=20
page
Optional
integer
The page number to retrieve results for.
Example: ?page=2
q
Optional
string
Search records by a given query.
Example: ?q=John
search_fields
Optional
string
Change the fields that the search will be performed to
Example:?search_fields=email:like;phones.number:=
search_match
Optional
string
By default the search queries are performed using the OR comparison operator for each query parameter, if you need to match all parameters, you will need to use the AND comparison operator.
Example: ?search_match=and
Retrieve Deal GET
Endpoint: https://subdomain.appcrm.com.br/api/deals/{id}
Headers
Content-Type
Required
string
application/json
Accept
Required
string
application/json
Authorization
Required
string
Bearer {token}
Path Parameters
id
Required
integer
The ID of the record
Create Deal POST
Endpoint: https://subdomain.appcrm.com.br/api/deals
Headers
Content-Type
Required
string
application/json
Accept
Required
string
application/json
Authorization
Required
string
Bearer {token}
Body Parameters
name
Required
string
amount
Optional
number
expected_close_date
Optional
date
Expected close date in UTC format
user_id
Optional
integer
The owner of the deal
tags
Optional
array
Tag names for the deal
swatch_color
Optional
string
The deal color in HEX format, used when displayed on board or in dropdowns.
status
Optional
string
Any of ['open', 'won', 'lost']
lost_reason
Optional
string
Applicable when status is lost.
billable
Optional
array
products
Optional
array
Array of products to be attached to the billable object See Product Metadata
tax_type
Optional
string
Any of ['exclusive', 'inclusive', 'no_tax']
If not provided, the default selected tax type in Settings -> Products will be used.
Product metadata
id
Optional
integer
Billable product ID, used to update an existing billable product. You don't need to provide such value when adding new products to the billable, provide the value when updating only.
product_id
Optional
integer
The product ID from the products resource. If not provided, App CRM will search for an existing product with the same name and if no such product, will create new product.
name
Required
string
Product name
description
Optional
string
Product description
unit_price
Required
number
Unit price - The price of each unit sold
qty
Optional
number
Product quantity (default 1)
discount_type
Optional
string
Any of ['percent', 'fixed']
discount_total
Optional
number
Percentage if discount_type is percent or total discount amount if discount_type is fixed
tax_label
Optional
string
tax_rate
Optional
number
unit
Optional
string
contacts
Optional
array
Array of contact ID's the deal is associated with.
companies
Optional
array
Array of company ID's the deal is associated with.
customFields
Optional
mixed
Any additional custom fields
Update Deal PUT
Endpoint: https://subdomain.appcrm.com.br/api/deals/{id}
Headers
Content-Type
Required
string
application/json
Accept
Required
string
application/json
Authorization
Required
string
Bearer {token}
Path Parameters
idRequired
Required
integer
The ID of the record
Body Parameters
name
Required
string
amount
Optional
number
Not applicable when the deal has products because the amount is automatically updated based on the total value of the products.
expected_close_date
Optional
date
Expected close date in UTC format
user_id
Optional
integer
The owner of the deal
tags
Optional
array
Tag names for the deal
swatch_color
Optional
string
The deal color in HEX format, used when displayed on board or in dropdowns.
status
Optional
string
Any of ['open', 'won', 'lost']
lost_reason
Optional
string
Applicable when status is lost.
billable
Optional
array
products
Optional
array
Array of products to be attached to the billable object See Product Metadata
removed_products
Optional
array
An array of billable product id's to remove from the record.
tax_type
Optional
string
Any of ['exclusive', 'inclusive', 'no_tax']
If not provided, the default selected tax type in Settings -> Products will be used.
Product metadado
id
Optional
integer
Billable product ID, used to update an existing billable product. You don't need to provide such value when adding new products to the billable, provide the value when updating only.
product_id
Optional
integer
The product ID from the products resource. If not provided, App CRM will search for an existing product with the same name and if no such product, will create new product.
name
Required
string
Product name
description
Optional
string
Product description
unit_price
Required
number
Unit price - The price of each unit sold
qty
Optional
number
Product quantity (default 1)
discount_type
Optional
string
Any of ['percent', 'fixed']
discount_total
Optional
number
Percentage if discount_type is percent or total discount amount if discount_type is fixed
tax_label
Optional
string
tax_rate
Optional
number
unit
Optional
string
contacts
Optional
array
Array of contact ID's the deal is associated with.
companies
Optional
array
Array of company ID's the deal is associated with.
customFields
Optional
mixed
Any additional custo fields
Delete Deal DELETE
Endpoint: https://subdomain.appcrm.com.br/api/deals/{id}
Headers
Content-Type
Required
string
application/json
Accept
Required
string
application/json
Authorization
Required
string
Bearer {token}
Path Parameters
id
Required
integer
The ID of the record
Search Deals GET
Endpoint: https://subdomain.appcrm.com.br/api/deals/search?q={query}
Use this endpoint to perform search without pagination and use the take parameter if you need to limit the results.
Headers
Content-Type
Required
string
application/json
Accept
Required
string
application/json
Authorization
Required
string
Bearer {token}
Path Parameters
q
Required
string
Query Parameters
take
Optional
integer
The maximum number of results to query
Example: ?take=1
order
Optional
string
Sort the results being queried.
Example: ?order=created_at or ?order=created_at|desc
select
Optional
string
Select only the provided fields, useful for query optimization.
Example: ?select=first_name;id
search_fields
Optional
string
Change the fields that the search will be performed to
Example:?search_fields=email:like;phones.number:=
search_match
Optional
string
By default the search queries are performed using the OR comparison operator for each query parameter, if you need to match all parameters, you will need to use the AND comparison operator.
Example: ?search_match=and
Attach Associations to Deal PUT
Endpoint: https://subdomain.appcrm.com.br/api/associations/deals/{id}
Headers
Content-Type
Required
string
application/json
Accept
Required
string
application/json
Authorization
Required
string
Bearer {token}
Path Parameters
id
Required
integer
The ID of the record
Make sure to provide at least one resource.
Body Parameters
contacts
Optional
array
Array of contacts ID's to attach
companies
Optional
array
Array of companies ID's to attach
activities
Optional
array
Array of activities ID's to attach
Detach Associations From Deals DELETE
Endpoint: https://subdomain.appcrm.com.br/api/associations/deals/{id}
Headers
Content-Type
Required
string
application/json
Accept
Required
string
application/json
Authorization
Required
string
Bearer {token}
Path Parameters
id
Required
integer
The ID of the record
Make sure to provide at least one resource.
Body Parameters
contacts
Optional
array
Array of contacts ID's to detach
companies
Optional
array
Array of companies ID's to detach
activities
Optional
array
Array of activities ID's to detach
Sync Associations To Deal POST
Endpoint: https://subdomain.appcrm.com.br/api/associations/deals/{id}
Headers
Content-Type
Required
string
application/json
Accept
Required
string
application/json
Authorization
Required
string
Bearer {token}
Path Parameters
id
Required
integer
The ID of the record
Make sure to provide at least one resource.
Body Parameters
contacts
Optional
array
Array of contacts ID's to sync
companies
Optional
array
Array of companies ID's to sync
activities
Optional
array
Array of activities ID's to sync
Change Deal Status PUT
Endpoint: https://subdomanin.appcrm.com.br/api/deals/{id}/status/{status}
This endpoint is deprecated, use the deal update endpoint and provide the status attribute.
Headers
Content-Type
Required
string
application/json
Accept
Required
string
application/json
Authorization
Required
string
Bearer {token}
Path Parameters
id
Required
integer
The ID of the record
status
Required
string
Any of ['open', 'won', 'lost']
Body Parameters
lost_reason
Optional
string
Deal lost reason when marking the deal as lost.
Deal Products POST
Endpoint: https://subdomain.appcrm.com.br/api/deals/{id}/billable
Use the endpoint to manage the deal products, making HTTP request to the same method, you can add new and update existing products to a deal.
Please note that the products resource is different from deal products, the products resource is used only to create predefined and a list of products so you can easily use the product information when linking products to deals.
When adding deal products, App CRM creates a billable object with tax information and products, in this case when adding products to the deal, you are adding products to the deal billable object with help of the predefined products.
Keep in mind that the predefined products are not affected by the products that are managed for the deal, the deal products are maintaning a separate state and using only the product_id attribute to link the deal product to the original product.
Headers
Content-Type
Required
string
application/json
Accept
Required
string
application/json
Authorization
Required
string
Bearer {token}
Path Parameters
id
Required
integer
The ID of the record
Body Parameters
products
Optional
array
Array of products to be attached to the billable object See Product Metadata below
removed_products
Optional
array
An array of billable product id's to remove from the record.
tax_type
Optional
string
Any of ['exclusive', 'inclusive', 'no_tax']
If not provided, the default selected tax type in Settings -> Products will be used.
Product metadata
id
Optional
integer
Billable product ID, used to update an existing billable product. You don't need to provide such value when adding new products to the billable, provide the value when updating only.
product_id
Optional
integer
The product ID from the products resource. If not provided, App CRM will search for an existing product with the same name and if no such product, will create new product.
name
Required
string
Product name
description
Optional
string
Product description
unit_price
Required
number
Unit price - The price of each unit sold
qty
Optional
number
Product quantity (default 1)
discount_type
Optional
string
Any of ['percent', 'fixed']
discount_total
Optional
number
Percentage if discount_type is percent or total discount amount if discount_type is fixed
tax_label
Optional
string
tax_rate
Optional
number
unit
Optional
string
Last updated
Was this helpful?