deleteAttachmentAttachmentId
delete attachment
Trwale usuwa plik załącznika oraz jego powiązanie z fakturą. Operacja jest nieodwracalna.
/attachment/{attachmentId}
Usage and SDK Samples
curl -X DELETE \
-H "X-API-Key: [[apiKey]]" \
-H "Accept: application/json" \
"https://ksef.devapo.app/api/rest/v1/attachment/{attachmentId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AttachmentApi;
import java.io.File;
import java.util.*;
public class AttachmentApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
// Create an instance of the API class
AttachmentApi apiInstance = new AttachmentApi();
UUID attachmentId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identyfikator (UUID) załącznika.
try {
apiInstance.deleteAttachmentAttachmentId(attachmentId);
} catch (ApiException e) {
System.err.println("Exception when calling AttachmentApi#deleteAttachmentAttachmentId");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final UUID attachmentId = new UUID(); // UUID | Identyfikator (UUID) załącznika.
try {
final result = await api_instance.deleteAttachmentAttachmentId(attachmentId);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->deleteAttachmentAttachmentId: $e\n');
}
import org.openapitools.client.api.AttachmentApi;
public class AttachmentApiExample {
public static void main(String[] args) {
AttachmentApi apiInstance = new AttachmentApi();
UUID attachmentId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identyfikator (UUID) załącznika.
try {
apiInstance.deleteAttachmentAttachmentId(attachmentId);
} catch (ApiException e) {
System.err.println("Exception when calling AttachmentApi#deleteAttachmentAttachmentId");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];
// Create an instance of the API class
AttachmentApi *apiInstance = [[AttachmentApi alloc] init];
UUID *attachmentId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identyfikator (UUID) załącznika. (default to null)
// delete attachment
[apiInstance deleteAttachmentAttachmentIdWith:attachmentId
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
var DevapoKseFIntegratorRestApi = require('devapo_kse_f_integrator_rest_api');
var defaultClient = DevapoKseFIntegratorRestApi.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['X-API-Key'] = "Token";
// Create an instance of the API class
var api = new DevapoKseFIntegratorRestApi.AttachmentApi()
var attachmentId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID} Identyfikator (UUID) załącznika.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.deleteAttachmentAttachmentId(attachmentId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class deleteAttachmentAttachmentIdExample
{
public void main()
{
// Configure API key authorization: ApiKeyAuth
Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");
// Create an instance of the API class
var apiInstance = new AttachmentApi();
var attachmentId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identyfikator (UUID) załącznika. (default to null)
try {
// delete attachment
apiInstance.deleteAttachmentAttachmentId(attachmentId);
} catch (Exception e) {
Debug.Print("Exception when calling AttachmentApi.deleteAttachmentAttachmentId: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AttachmentApi();
$attachmentId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identyfikator (UUID) załącznika.
try {
$api_instance->deleteAttachmentAttachmentId($attachmentId);
} catch (Exception $e) {
echo 'Exception when calling AttachmentApi->deleteAttachmentAttachmentId: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AttachmentApi;
# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AttachmentApi->new();
my $attachmentId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identyfikator (UUID) załącznika.
eval {
$api_instance->deleteAttachmentAttachmentId(attachmentId => $attachmentId);
};
if ($@) {
warn "Exception when calling AttachmentApi->deleteAttachmentAttachmentId: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# Create an instance of the API class
api_instance = openapi_client.AttachmentApi()
attachmentId = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identyfikator (UUID) załącznika. (default to null)
try:
# delete attachment
api_instance.delete_attachment_attachment_id(attachmentId)
except ApiException as e:
print("Exception when calling AttachmentApi->deleteAttachmentAttachmentId: %s\n" % e)
extern crate AttachmentApi;
pub fn main() {
let attachmentId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
let mut context = AttachmentApi::Context::default();
let result = client.deleteAttachmentAttachmentId(attachmentId, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
Name | Description |
---|---|
attachmentId* |
UUID
(uuid)
Identyfikator (UUID) załącznika.
Required
|