Merge client
Changed onPOST /api/v1/clients/{id}/{mergeable_client_hashed_id}/merge
Handles merging 2 clients
The id parameter is the client that will be the primary client after the merge has completed.
The mergeable_client_hashed_id is the client that will be merged into the primary client, this clients records will be updated and associated with the primary client.
🚨 Important
This action requires elevated permissions, please note the X-API-PASSWORD header requirements for this route.
Request
- Base URLhttps://demo.invoiceninja.com
- Authnone declared. Required headers: X-API-TOKEN, X-Requested-With, X-API-PASSWORD
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
The Client Hashed ID
The Mergeable Client Hashed ID
Query parameters
Replaces the default response index from data to a user specific string
ie.
?index=new_index
response is wrapped
{
'new_index' : [
.....
]
}
Include child relationships of the Client Object. ie ?include=documents,system_logs
Available includes:
contacts [All contacts related to the client]
documents [All documents related to the client]
gateway_tokens [All payment tokens related to the client]
activities [All activities related to the client]
ledger [The client ledger]
system_logs [System logs related to the client]
group_settings [The group settings object the client is assigned to]
Usage:
/api/v1/clients?include=contacts,documents,activities
Headers
The API token to be used for authentication
Used to send the XMLHttpRequest header
The login password when challenged on certain protected routes
Response
Returns the client object
Changes
- info
added the new optional
queryrequest parameterindex
- info
- breaking
the response's body type changed from no type to
objectfor status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- breaking