Overview
This web service deletes a specified client (PwsClientRef). The service will return the identity (PwsClientRef) of the deleted client (PwsClientRef).
Request Format
Panel |
---|
title | PwsDeleteClient Request |
---|
|
- serviceRequest: PwsDeleteClientRq
|
Request Elements
Element | Data Type | Required? | Default | Description | RequestIDSample Data |
---|
RequestId | Int32 | NoThe caller may supply any desired value here. The value supplied will be echoed back in the response as the ResponseId. |
| Click here for more information | 1 |
SessionTicket | String | YesThis field is required. The session ticket is generated by the web service PwsAuthenticate. |
| Click here for more information | AavFwbZgVb9V4tr3R7BbzQ== |
CascadeDeleteFlag | Boolean | No | "false" | This flag is set to "'true" ', when the user wants to delete the client and , all of the client's children - If set to "'false"', an attempt to delete a client that has one more children will fail
- If set to "'true"', and the client and all of its children can be deleted, all clients are deleted
- If set to "'true"', and the InactivateIfInUseFlag is also set to true, the client and its children will be deleted if possible, otherwise they will be marked inactive. A client can be deleted if it is not in use elsewhere and all its children (if any) can be deleted. Otherwise, it must be inactivated
- If set to "'true"', and the InactivateIfInUseFlag is set to false, an error is returned (because at least one client cannot be deleted, per bullet 2 above)
| true/false |
ClientIdentity | PwsClientRef [1] | Yes |
| This is the identity of the client to be deleted |
|
InactivateIfInuseFlag | Boolean | No | "false" | If set to 'true', a client that cannot be deleted because it is in use will be set to inactive, otherwise the request will fail. | true/false |
Request Usage Example(s)
...
Code Block |
---|
language | xml |
---|
title | Request Example 01 |
---|
collapse | true |
---|
|
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
<soapenv:Header/>
<PwsDeleteClient><soapenv:Body>
<pws:PwsDeleteClient>
<serviceRequest><pws:serviceRequest>
<RequestId>1<<req:RequestId>1</req:RequestId>
<SessionTicket>AVWN2cthcvkr13Vtxbkl4Q<req:SessionTicket>AavFwbZgVb9V4tr3R7BbzQ==</req:SessionTicket>
<CascadeDeleteFlag>true<<req:CascadeDeleteFlag>true</req:CascadeDeleteFlag>
<req:ClientIdentity>
<ClientIdentity> <com:ClientNumber>C000122</com:ClientNumber>
</req:ClientIdentity>
<req:InactivateIfInuseFlag>true</req:InactivateIfInuseFlag>
</pws:serviceRequest>
</pws:PwsDeleteClient>
<!--com:ClientId>?</com:ClientId--/soapenv:Body>
</soapenv:Envelope> |
Response Format
Response Elements
Response Usage Example(s)
Code Block |
---|
language | xml |
---|
title | Example 01 |
---|
collapse | true |
---|
|
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<PwsDeleteClientResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
<PwsDeleteClientResult xmlns:a="http://projectorpsa.com/DataContracts/Responses/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Messages xmlns="http://projectorpsa.com/CommonServices/" <com:ClientNumber>C000117</com:ClientNumber>xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
<ResponseId xmlns="http://projectorpsa.com/CommonServices/">1</ResponseId>
<Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status>
<!--com:ClientUid>?</com:ClientUid--> <ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2018-01-17T19:00:18.2269303Z</ServerTimestampUtc>
<a:ClientIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
<b:ClientId i:nil="true"/>
<b:ClientNumber>C000122</b:ClientNumber>
</ClientIdentity> <b:ClientUid>1152921504606998463</b:ClientUid>
<InactivateIfInuseFlag>true<</InactivateIfInuseFlag>a:ClientIdentity>
</serviceRequest>PwsDeleteClientResult>
</PwsDeleteClientResponse>
</s:Body>
</PwsDeleteClient> |
Response Format
Panel |
---|
title | PwsDeleteClientResponse |
---|
|
- servicerequest: PwsDeleteClientRs
- ClientID: Int32
- ClientNumber: String
- ClientUID: Int64
|
Response Elements
...
PwsDeleteClient - Common Errors and Warnings
- For all errors and warnings please refer to the Complete List of Errors and Warnings
ErrorNumber | ErrorCode | ErrorText |
---|
101 | ClientInactivated | The client could not be deleted and instead it was marked inactive |
50046 | UpdatePermissionDenied | You do not have permission to update this item. |
57623 | UnexpectedErrorDeletingClient | There was an unexpected error while trying to delete the client. |
57624 | ClientHasChildClients | The client could not be deleted because there are one or more child clients of this client. |
57625 | ChildClientCouldNotBeDeleted | The client could not be deleted because one of its child clients could not be deleted. |
57626 | ChildIsReferencedByEngagement | The client could not be deleted because at least one engagement is associated with this client. |
57627 | ClientIsReferencedByUser | The client could not be deleted because at least one user is associated with this client. |
57628 | ClientIsReferencedByInvoice | The client could not be deleted because at least one invoice is associated with this client. |
57629 | ClientNotFound | The specified client was not found. |
57631 | ClientNotSpecified | A specified client identity was incomplete. Each client identity must specify either a client id, client uid or client number. |