Skip to content

Commit

Permalink
Updates for client routes
Browse files Browse the repository at this point in the history
  • Loading branch information
turbo124 committed Nov 17, 2024
1 parent c264809 commit 5be5c72
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 12 deletions.
63 changes: 52 additions & 11 deletions api-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12983,6 +12983,7 @@ paths:
parameters:
- $ref: '#/components/parameters/X-API-TOKEN'
- $ref: '#/components/parameters/X-Requested-With'
- $ref: '#/components/parameters/index'
- $ref: '#/components/parameters/client_include'
requestBody:
description: Client object that needs to be added to the company
Expand Down Expand Up @@ -13038,6 +13039,7 @@ paths:
parameters:
- $ref: '#/components/parameters/X-API-TOKEN'
- $ref: '#/components/parameters/X-Requested-With'
- $ref: '#/components/parameters/index'
- $ref: '#/components/parameters/client_include'
- name: id
in: path
Expand Down Expand Up @@ -13075,7 +13077,12 @@ paths:
tags:
- clients
summary: 'Update client'
description: 'Handles the updating of a client by id'
description: |
Handles the updating of a client by id

> 🚨 Important
When creating (or updating) a client you must include the child contacts with all mutating requests. Client contacts cannot be modified in isolation.

x-codeSamples:
- lang: php
label: php
Expand Down Expand Up @@ -13113,6 +13120,7 @@ paths:
parameters:
- $ref: '#/components/parameters/X-API-TOKEN'
- $ref: '#/components/parameters/X-Requested-With'
- $ref: '#/components/parameters/index'
- $ref: '#/components/parameters/client_include'
- name: id
in: path
Expand Down Expand Up @@ -13157,7 +13165,14 @@ paths:
tags:
- clients
summary: 'Delete client'
description: 'Handles the deletion of a client by id'
description: |
Handles the deletion of a client by id

> ❗ Note
Deleting a client does not purge the client from the system. The delete action will remove the clients data from all
views in the application but keep it all on file. A Client can be laterrestored reversing this action. To permanently wipe a client and
all of their records from the system, use the /purge route

x-codeSamples:
- lang: php
label: php
Expand All @@ -13175,6 +13190,7 @@ paths:
parameters:
- $ref: '#/components/parameters/X-API-TOKEN'
- $ref: '#/components/parameters/X-Requested-With'
- $ref: '#/components/parameters/index'
- $ref: '#/components/parameters/client_include'
- name: id
in: path
Expand Down Expand Up @@ -13214,7 +13230,8 @@ paths:
parameters:
- $ref: '#/components/parameters/X-API-TOKEN'
- $ref: '#/components/parameters/X-Requested-With'
- $ref: '#/components/parameters/include'
- $ref: '#/components/parameters/index'
- $ref: '#/components/parameters/client_include'
- name: id
in: path
description: 'The Client Hashed ID'
Expand Down Expand Up @@ -13257,6 +13274,7 @@ paths:
parameters:
- $ref: '#/components/parameters/X-API-TOKEN'
- $ref: '#/components/parameters/X-Requested-With'
- $ref: '#/components/parameters/index'
- $ref: '#/components/parameters/client_include'
responses:
200:
Expand Down Expand Up @@ -13349,6 +13367,7 @@ paths:
- $ref: '#/components/parameters/X-API-TOKEN'
- $ref: '#/components/parameters/X-Requested-With'
- $ref: '#/components/parameters/index'
- $ref: '#/components/parameters/client_include'
requestBody:
description: 'Bulk action array'
required: true
Expand Down Expand Up @@ -13406,6 +13425,7 @@ paths:
parameters:
- $ref: '#/components/parameters/X-API-TOKEN'
- $ref: '#/components/parameters/X-Requested-With'
- $ref: '#/components/parameters/index'
- $ref: '#/components/parameters/client_include'
- name: id
in: path
Expand All @@ -13425,10 +13445,24 @@ paths:
_method:
type: string
example: POST
documents:
documents[]:
type: array
description: |
Array of files to upload. The files should be sent with the key name 'documents[]'.

Supported file types:
- PDF (.pdf)
- Word (.doc, .docx)
- Excel (.xls, .xlsx)
- Images (.jpg, .jpeg, .png)
- Text (.txt)

Maximum file size: 20MB per file
items:
type: string
format: binary
description: The file contents
example: "@/path/to/document.pdf"
responses:
200:
description: 'Returns the client object'
Expand Down Expand Up @@ -13461,8 +13495,8 @@ paths:
description: |
Handles purging a client.

Please note this is a destructive action.

> ❗ Note
This is a destructive action.
This action will remove all data associated with the client and cannot be undone.
x-codeSamples:
- lang: php
Expand All @@ -13483,7 +13517,6 @@ paths:
- $ref: '#/components/parameters/X-API-TOKEN'
- $ref: '#/components/parameters/X-Requested-With'
- $ref: '#/components/parameters/X-API-PASSWORD'
- $ref: '#/components/parameters/client_include'
- name: id
in: path
description: 'The Client Hashed ID'
Expand Down Expand Up @@ -13523,6 +13556,10 @@ paths:
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.

x-codeSamples:
- lang: php
label: php
Expand All @@ -13540,8 +13577,9 @@ paths:
parameters:
- $ref: '#/components/parameters/X-API-TOKEN'
- $ref: '#/components/parameters/X-Requested-With'
- $ref: '#/components/parameters/client_include'
- $ref: '#/components/parameters/X-API-PASSWORD'
- $ref: '#/components/parameters/index'
- $ref: '#/components/parameters/client_include'
- name: id
in: path
description: 'The Client Hashed ID'
Expand Down Expand Up @@ -13614,7 +13652,8 @@ paths:
parameters:
- $ref: '#/components/parameters/X-API-TOKEN'
- $ref: '#/components/parameters/X-Requested-With'
- $ref: '#/components/parameters/include'
- $ref: '#/components/parameters/index'
- $ref: '#/components/parameters/client_include'
requestBody:
description: 'Statement Options'
required: true
Expand Down Expand Up @@ -13677,7 +13716,8 @@ paths:
parameters:
- $ref: '#/components/parameters/X-API-TOKEN'
- $ref: '#/components/parameters/X-Requested-With'
- $ref: '#/components/parameters/include'
- $ref: '#/components/parameters/index'
- $ref: '#/components/parameters/client_include'
- name: bounce_id
in: path
description: 'The postmark Bounce ID reference'
Expand Down Expand Up @@ -13720,7 +13760,8 @@ paths:
parameters:
- $ref: '#/components/parameters/X-API-TOKEN'
- $ref: '#/components/parameters/X-Requested-With'
- $ref: '#/components/parameters/include'
- $ref: '#/components/parameters/index'
- $ref: '#/components/parameters/client_include'
- name: client
in: path
description: 'The Client Hashed ID reference'
Expand Down
5 changes: 4 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
targetKey: 'php',
clientKey: 'php',
},
defaultOpenAllTags: true
defaultOpenAllTags: true,
hideModels: true,
hideDownloadButton: true

}

document.getElementById('api-reference').dataset.configuration =
Expand Down

0 comments on commit 5be5c72

Please sign in to comment.