# Delete vendor DELETE https://api-sandbox.payabli.com/api/Vendor/{idVendor} Delete a vendor. Reference: https://docs.payabli.com/developers/api-reference/vendor/delete-vendor ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Delete vendor version: endpoint_vendor.DeleteVendor paths: /Vendor/{idVendor}: delete: operationId: delete-vendor summary: Delete vendor description: 'Delete a vendor. ' tags: - - subpackage_vendor parameters: - name: idVendor in: path description: Vendor ID. required: true schema: type: integer - name: requestToken in: header required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/type_:PayabliApiResponseVendors' '400': description: Bad request/ invalid data content: {} '401': description: Unauthorized request. content: {} '500': description: Internal API Error content: {} '503': description: Database connection error content: {} components: schemas: type_:IsSuccess: type: boolean type_:PageIdentifier: type: string type_:Responsecode: type: integer type_:ResponseText: type: string type_:PayabliApiResponseVendors: type: object properties: isSuccess: $ref: '#/components/schemas/type_:IsSuccess' pageIdentifier: $ref: '#/components/schemas/type_:PageIdentifier' responseCode: $ref: '#/components/schemas/type_:Responsecode' responseData: type: integer description: >- If the request was successful, this field contains the identifier for the vendor. responseText: $ref: '#/components/schemas/type_:ResponseText' required: - responseText ``` ## SDK Code Examples ```python from payabli import payabli client = payabli( api_key="YOUR_API_KEY", ) client.vendor.delete_vendor( id_vendor=1, ) ``` ```typescript import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.vendor.deleteVendor(1); ``` ```go import ( context "context" option "github.com/payabli/sdk-go/option" sdkgoclient "github.com/payabli/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "", ), ) response, err := client.Vendor.DeleteVendor( context.TODO(), 1, ) ``` ```csharp using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.Vendor.DeleteVendorAsync(1); ``` ```ruby require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/Vendor/1") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Delete.new(url) request["requestToken"] = '' response = http.request(request) puts response.read_body ``` ```java HttpResponse response = Unirest.delete("https://api-sandbox.payabli.com/api/Vendor/1") .header("requestToken", "") .asString(); ``` ```php request('DELETE', 'https://api-sandbox.payabli.com/api/Vendor/1', [ 'headers' => [ 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```swift import Foundation let headers = ["requestToken": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Vendor/1")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "DELETE" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```