Delete credit card collection
curl --request DELETE \
--url https://dev.noyax.com/services/noyax_api/api/v1/finance/credit-card-collections/{creditCardCollectionId} \
--header 'Authorization: Bearer <token>' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>'using RestSharp;
var options = new RestClientOptions("https://dev.noyax.com/services/noyax_api/api/v1/finance/credit-card-collections/{creditCardCollectionId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-UserID", "<x-userid>");
request.AddHeader("X-CompanyID", "<x-companyid>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {
method: 'DELETE',
headers: {
'X-UserID': '<x-userid>',
'X-CompanyID': '<x-companyid>',
Authorization: 'Bearer <token>'
}
};
fetch('https://dev.noyax.com/services/noyax_api/api/v1/finance/credit-card-collections/{creditCardCollectionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dev.noyax.com/services/noyax_api/api/v1/finance/credit-card-collections/{creditCardCollectionId}"
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text){
"Success": false,
"ResultCode": "8709",
"Message": "The voucher has already been settled by a bank repayment voucher and can no longer be deleted.",
"Errors": [
{
"Code": "8709",
"Message": "The voucher has already been settled by a bank repayment voucher and can no longer be deleted."
}
]
}{
"Success": false,
"ResultCode": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token.",
"Errors": [
{
"Code": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token."
}
]
}{
"Success": false,
"ResultCode": "0110",
"Message": "You do not have permission for this operation.",
"Errors": [
{
"Code": "0110",
"Message": "You do not have permission for this operation."
}
]
}{
"Success": false,
"ResultCode": "8700",
"Message": "Credit card collection not found.",
"Errors": [
{
"Code": "8700",
"Message": "Credit card collection not found."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}Credit card collections
Delete credit card collection
Deletes the voucher and its lines.
DELETE
/
api
/
v1
/
finance
/
credit-card-collections
/
{creditCardCollectionId}
Delete credit card collection
curl --request DELETE \
--url https://dev.noyax.com/services/noyax_api/api/v1/finance/credit-card-collections/{creditCardCollectionId} \
--header 'Authorization: Bearer <token>' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>'using RestSharp;
var options = new RestClientOptions("https://dev.noyax.com/services/noyax_api/api/v1/finance/credit-card-collections/{creditCardCollectionId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-UserID", "<x-userid>");
request.AddHeader("X-CompanyID", "<x-companyid>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {
method: 'DELETE',
headers: {
'X-UserID': '<x-userid>',
'X-CompanyID': '<x-companyid>',
Authorization: 'Bearer <token>'
}
};
fetch('https://dev.noyax.com/services/noyax_api/api/v1/finance/credit-card-collections/{creditCardCollectionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dev.noyax.com/services/noyax_api/api/v1/finance/credit-card-collections/{creditCardCollectionId}"
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text){
"Success": false,
"ResultCode": "8709",
"Message": "The voucher has already been settled by a bank repayment voucher and can no longer be deleted.",
"Errors": [
{
"Code": "8709",
"Message": "The voucher has already been settled by a bank repayment voucher and can no longer be deleted."
}
]
}{
"Success": false,
"ResultCode": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token.",
"Errors": [
{
"Code": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token."
}
]
}{
"Success": false,
"ResultCode": "0110",
"Message": "You do not have permission for this operation.",
"Errors": [
{
"Code": "0110",
"Message": "You do not have permission for this operation."
}
]
}{
"Success": false,
"ResultCode": "8700",
"Message": "Credit card collection not found.",
"Errors": [
{
"Code": "8700",
"Message": "Credit card collection not found."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}A posted voucher, or one already settled by a bank repayment voucher, cannot be deleted (
8708/8709). If any line’s customer movement has been closed or has a payment plan, the whole voucher is not deleted (8809/8810).
Error codes
Codes this endpoint can return. The general errors that apply to every endpoint (authentication, permissions, request headers, daily limit) are not repeated here.| Code | HTTP | Meaning |
|---|---|---|
8700 | 404 | Credit card collection not found |
8708 | 400 | The voucher has been posted to accounting and can no longer be updated or deleted |
8709 | 400 | The voucher has been settled by a bank repayment voucher and can no longer be updated or deleted |
8809 | 400 | The line’s customer record has been closed, operation cancelled |
8810 | 400 | A payment plan has been created for the line’s customer record, operation cancelled |
Authorizations
Access token obtained from the Noyax auth service with your API key.
Headers
ID of the Noyax user the request is made on behalf of. Written to the audit fields of created, updated and deleted records.
Required range:
x >= 1ID of the company. The user must be assigned to this company. All reads and writes are limited to this company.
Required range:
x >= 1ID of the accounting period. Optional for customer endpoints; if sent, it is written to created records.
Required range:
x >= 1Path Parameters
Credit card collection ID.
Response
No Content