-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'remotes/dev/2.0' into 2.0
- Loading branch information
Showing
75 changed files
with
10,196 additions
and
639 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
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
api: | ||
entities: | ||
Oro\Bundle\AccountBundle\Entity\Account: ~ | ||
Oro\Bundle\AccountBundle\Entity\Account: | ||
documentation_resource: '@OroAccountBundle/Resources/doc/api/account.md' |
379 changes: 379 additions & 0 deletions
379
src/Oro/Bundle/AccountBundle/Resources/doc/api/account.md
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,379 @@ | ||
# Oro\Bundle\AccountBundle\Entity\Account | ||
|
||
## ACTIONS | ||
|
||
### get | ||
Retrieve a specific account record. | ||
|
||
{@inheritdoc} | ||
|
||
### get_list | ||
|
||
Retrieve a collection of account records. | ||
|
||
{@inheritdoc} | ||
|
||
### create | ||
|
||
Create a new account record. | ||
The created record is returned in the response. | ||
|
||
{@inheritdoc} | ||
|
||
{@request:json_api} | ||
Example: | ||
|
||
`</api/accounts>` | ||
|
||
```JSON | ||
{ | ||
"data":{ | ||
"type":"accounts", | ||
"attributes":{ | ||
"extend_description":null, | ||
"name":"Gartner management group" | ||
}, | ||
"relationships":{ | ||
"owner":{ | ||
"data":{ | ||
"type":"users", | ||
"id":"44" | ||
} | ||
}, | ||
"contacts":{ | ||
"data":[ | ||
{ | ||
"type":"contacts", | ||
"id":"1" | ||
}, | ||
{ | ||
"type":"contacts", | ||
"id":"3" | ||
}, | ||
{ | ||
"type":"contacts", | ||
"id":"22" | ||
} | ||
] | ||
}, | ||
"defaultContact":{ | ||
"data":{ | ||
"type":"contacts", | ||
"id":"1" | ||
} | ||
}, | ||
"organization":{ | ||
"data":{ | ||
"type":"organizations", | ||
"id":"1" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
{@/request} | ||
|
||
### update | ||
|
||
Edit a specific account record. | ||
The updated record is returned in the response. | ||
|
||
{@inheritdoc} | ||
|
||
{@request:json_api} | ||
Example: | ||
|
||
`</api/accounts/51>` | ||
|
||
```JSON | ||
{ | ||
"data":{ | ||
"type":"accounts", | ||
"id":"51", | ||
"attributes":{ | ||
"extend_description":null, | ||
"name":"Life Plan Counselling" | ||
}, | ||
"relationships":{ | ||
"owner":{ | ||
"data":{ | ||
"type":"users", | ||
"id":"44" | ||
} | ||
}, | ||
"contacts":{ | ||
"data":[ | ||
{ | ||
"type":"contacts", | ||
"id":"1" | ||
}, | ||
{ | ||
"type":"contacts", | ||
"id":"3" | ||
}, | ||
{ | ||
"type":"contacts", | ||
"id":"22" | ||
} | ||
] | ||
}, | ||
"defaultContact":{ | ||
"data":{ | ||
"type":"contacts", | ||
"id":"1" | ||
} | ||
}, | ||
"organization":{ | ||
"data":{ | ||
"type":"organizations", | ||
"id":"1" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
{@/request} | ||
|
||
### delete | ||
|
||
Delete a specific account record. | ||
|
||
{@inheritdoc} | ||
|
||
### delete_list | ||
|
||
Delete a collection of account records. | ||
The list of records that will be deleted, could be limited by filters. | ||
|
||
{@inheritdoc} | ||
|
||
## FIELDS | ||
|
||
### name | ||
|
||
#### create | ||
|
||
{@inheritdoc} | ||
|
||
**The required field** | ||
|
||
#### update | ||
|
||
{@inheritdoc} | ||
|
||
**Please note:** | ||
|
||
*This field is **required** and must remain defined.* | ||
|
||
### id | ||
|
||
#### update | ||
|
||
{@inheritdoc} | ||
|
||
**The required field** | ||
|
||
## SUBRESOURCES | ||
|
||
### contacts | ||
|
||
#### get_subresource | ||
|
||
Retrieve contact records assigned to a specific account record. | ||
|
||
#### get_relationship | ||
|
||
Retrieve contact IDs assigned to a specific account record. | ||
|
||
#### add_relationship | ||
|
||
Set contacts records for a specific account record. | ||
|
||
{@request:json_api} | ||
Example: | ||
|
||
`</api/accounts/1/relationships/contacts>` | ||
|
||
```JSON | ||
{ | ||
"data": [ | ||
{ | ||
"type": "contacts", | ||
"id": "1" | ||
}, | ||
{ | ||
"type": "contacts", | ||
"id": "3" | ||
}, | ||
{ | ||
"type": "contacts", | ||
"id": "22" | ||
} | ||
] | ||
} | ||
``` | ||
{@/request} | ||
|
||
#### update_relationship | ||
|
||
Replace the list of contacts assigned to a specific account record. | ||
|
||
{@request:json_api} | ||
Example: | ||
|
||
`</api/accounts/1/relationships/contacts>` | ||
|
||
```JSON | ||
{ | ||
"data": [ | ||
{ | ||
"type": "contacts", | ||
"id": "1" | ||
}, | ||
{ | ||
"type": "contacts", | ||
"id": "3" | ||
}, | ||
{ | ||
"type": "contacts", | ||
"id": "22" | ||
} | ||
] | ||
} | ||
``` | ||
{@/request} | ||
|
||
#### delete_relationship | ||
|
||
Remove contact records from a specific account record. | ||
|
||
### defaultContact | ||
|
||
#### get_subresource | ||
|
||
Retrieve the contact record that is default for a specific account record. | ||
|
||
#### get_relationship | ||
|
||
Retrieve the ID of the default contact assigned to a specific account record. | ||
|
||
#### update_relationship | ||
|
||
Replace the default contact record assigned to a specific account record. | ||
|
||
{@request:json_api} | ||
Example: | ||
|
||
`</api/accounts/1/relationships/defaultContact>` | ||
|
||
```JSON | ||
{ | ||
"data": { | ||
"type": "contacts", | ||
"id": "1" | ||
} | ||
} | ||
``` | ||
{@/request} | ||
|
||
### organization | ||
|
||
#### get_subresource | ||
|
||
Retrieve the record of the organization a specific account belongs to. | ||
|
||
#### get_relationship | ||
|
||
Retrieve the ID of the organization record that a specific account record belongs to. | ||
|
||
#### update_relationship | ||
|
||
Replace the organization a specific account belongs to. | ||
|
||
{@request:json_api} | ||
Example: | ||
|
||
`</api/accounts/1/relationships/organization>` | ||
|
||
```JSON | ||
{ | ||
"data": { | ||
"type": "organizations", | ||
"id": "1" | ||
} | ||
} | ||
``` | ||
{@/request} | ||
|
||
### owner | ||
|
||
#### get_subresource | ||
|
||
Retrieve the record of the user who is the owner of a specific lead record. | ||
|
||
#### get_relationship | ||
|
||
Retrieve the ID of a user who is the owner of a specific account record. | ||
|
||
#### update_relationship | ||
|
||
Replace the owner of a specific account record. | ||
|
||
{@request:json_api} | ||
Example: | ||
|
||
`</api/accounts/1/relationships/owner>` | ||
|
||
```JSON | ||
{ | ||
"data": { | ||
"type": "users", | ||
"id": "44" | ||
} | ||
} | ||
``` | ||
{@/request} | ||
|
||
### referredBy | ||
|
||
#### get_subresource | ||
|
||
Retrieve the account records that refer to a specific account record. | ||
|
||
**Please note:** | ||
|
||
*This parameter is currently unavailable via the OroCRM interface.* | ||
|
||
#### get_relationship | ||
|
||
Retrieve the IDs of account records that refer to a specific account record. | ||
|
||
**Please note:** | ||
|
||
*This parameter is currently unavailable via the OroCRM interface.* | ||
|
||
#### update_relationship | ||
|
||
Replace the account records that refer to a specific account record. | ||
|
||
**Please note:** | ||
|
||
*This parameter is currently unavailable via the OroCRM interface.* | ||
|
||
{@request:json_api} | ||
Example: | ||
|
||
`</api/accounts/1/relationships/referredBy>` | ||
|
||
```JSON | ||
{ | ||
"data": { | ||
"type": "accounts", | ||
"id": "2" | ||
} | ||
} | ||
``` | ||
{@/request} |
Oops, something went wrong.