The following resources are applicable:
Mount Point: /rest/v2/client_payments
The following operations are supported on this resource:
The client payments REST service end point returns a set of ClientPayments
name | description | type | default |
---|---|---|---|
firstResult | Optional, defaults to 0. Used for pagination, the firstResult query parameter specifies the first record to be returned by the ‘List All Sales Invoices’ end point. The parameter is 0 index-based, and so if requesting the first sales invoice in the list of sales invoices, firstResult should be set to 0. The firstResult parameter is optional, and the default value for firstResult is 0. If specified, firstResult should be set to any non-negative integer. | query | 0 |
resultsPerPage | Optional, defaults to 0. Used for pagination, the resultsPerPage query parameter specifies the maximum number of results returned by the ‘List All Sales Invoices’ service. The resultsPerPage parameter is relative to the firstResult parameter - therefore if firstResult is set to 0 and resultsPerPage is set to 10, then only the first 10 sales invoices from the overall list of sales invoices will be returned. If firstResult is set to 10 and resultsPerPage is set to 10, then the service will return the next 10 records (i.e the sales invoices at positions 10 to 19 in the complete list of sales invoices). The resultsPerPage parameter is optional. If no value is provided the service will return the entire result set - i.e. all sales invoices in the account. Valid values for resultsPerPage are any positive integer value, so any integer greater than or equal to 1. | query |
element: | media types: |
---|---|
clientPayment | application/xml, application/json |
CustomerPayments or Errors
HTTP Status Code | Description |
---|---|
200 OK | ClientPayments found |
400 Bad Request | Invalid input, returns message body of Errors |
500 Internal Server Error | A database error has occurred |
The add client payment service allows a body of XML to be POSTed to the server. The service will validate the data contained within the XML payload and create a client payment within Crunch.
element: | media types: |
---|---|
clientPayment | application/xml, application/json, application/*+xml |
A single client payment to add
element: | media types: |
---|---|
clientPayment | application/xml, application/json |
CustomerPayment (with only the newly created CustomerPayment ID set) or Errors
HTTP Status Code | Description |
---|---|
201 Created | CustomerPayment added |
400 Bad Request | Invalid input, returns message body of Errors |
500 Internal Server Error | A database error has occurred |
Options call to handle CORS requests (typically coming from javascript frameworks like jQuery) See here for further information.
element: | media types: |
---|---|
(custom) | /, application/xml |
(no documentation provided)
Mount Point: /rest/v2/client_payments/{clientPaymentId}
The client payments REST service end point returns a specific client payment based on the ID specified
name | description | type | default |
---|---|---|---|
clientPaymentId | Id of client payment required | path |
element: | media types: |
---|---|
clientPayment | application/xml, application/json |
CustomerPayment or Errors
HTTP Status Code | Description |
---|---|
200 OK | ClientPayment found |
400 Bad Request | Invalid input, returns message body of Errors |
500 Internal Server Error | A database error has occurred |
The update client payment service allows a body of XML to be PUTted to the server. The service will validate the data contained within the XML payload and update a client payment within Crunch.
name | description | type | default |
---|---|---|---|
clientPaymentId | The client payment id to update | path |
element: | media types: |
---|---|
clientPayment | application/xml, application/json, application/*+xml |
A single client payment to update
element: | media types: |
---|---|
clientPayment | application/xml, application/json |
ClientPayment (with only the updated CustomerPayment ID set) or Errors
HTTP Status Code | Description |
---|---|
200 OK | ClientPayment updated |
400 Bad Request | Invalid input, returns message body of Errors |
500 Internal Server Error | A database error has occurred |