> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://beta-docs.payabli.com/api-reference/vendor/import-vendor/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://beta-docs.payabli.com/_mcp/server. # Import vendors POST https://api-sandbox.payabli.com/api/Import/vendorsForm/{entry} Content-Type: multipart/form-data Import a list of vendors from a CSV file. See the [Import Guide](/developer-guides/entities-import) for more help and example files. Reference: https://beta-docs.payabli.com/api-reference/vendor/import-vendor ## Authentication - `requestToken` header (required) — API Key authentication via header ## Servers - `https://api-sandbox.payabli.com/api` (Sandbox, default) - `https://api.payabli.com/api` (Production) ## Request ### Path parameters - `entry` (string, required) — The entrypoint identifier. ### Body (multipart/form-data) This endpoint expects a multipart form containing a file. - `file` (file, required) ## Response ### 200 Success - `isSuccess` (boolean, optional) — Boolean indicating whether the operation was successful. A `true` value indicates success. A `false` value indicates failure. - `pageIdentifier` (string, optional) — Auxiliary validation used internally by payment pages and components. - `responseCode` (integer, optional) — Code for the response. Learn more in [API Response Codes](/api-reference/api-responses). - `responseData` (PayabliApiResponseImportResponseData, optional) — The response data containing the result of the import operation. - `responseText` (string, optional) — Response text for operation: 'Success' or 'Declined'. ## Errors ### 400 Bad Request Error Bad request/ invalid data - `any` ### 401 Unauthorized Error Unauthorized request. - `any` ### 500 Internal Server Error Internal API Error - `any` ### 503 Service Unavailable Error Database connection error - `isSuccess` (boolean, optional) — Boolean indicating whether the operation was successful. A `true` value indicates success. A `false` value indicates failure. - `responseData` (map from string to any, optional) — The object containing the response data. - `responseText` (string, optional) — Response text for operation: 'Success' or 'Declined'. ## Types ### PayabliApiResponseImportResponseData The response data containing the result of the import operation. - `added` (integer, optional) — The number of records successfully added. - `errors` (list of string, optional) — List of errors, if any. - `rejected` (integer, optional) — The number of records that were rejected. ## Examples **Request** ```json { "file": ">" } ``` **Response** ```json { "isSuccess": true, "pageIdentifier": "null", "responseCode": 1, "responseData": { "added": 26, "errors": [ "errors", "errors" ], "rejected": 2 }, "responseText": "Success" } ``` **SDK Code** ```python ImportVendor import requests url = "https://api-sandbox.payabli.com/api/Import/vendorsForm/8cfec329267" files = { "file": "open('', 'rb')" } headers = {"requestToken": ""} response = requests.post(url, files=files, headers=headers) print(response.json()) ``` ```javascript ImportVendor const url = 'https://api-sandbox.payabli.com/api/Import/vendorsForm/8cfec329267'; const form = new FormData(); form.append('file', ''); const options = {method: 'POST', headers: {requestToken: ''}}; options.body = form; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go ImportVendor package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api-sandbox.payabli.com/api/Import/vendorsForm/8cfec329267" payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("requestToken", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby ImportVendor require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/Import/vendorsForm/8cfec329267") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["requestToken"] = '' request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n" response = http.request(request) puts response.read_body ``` ```java ImportVendor import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-sandbox.payabli.com/api/Import/vendorsForm/8cfec329267") .header("requestToken", "") .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n") .asString(); ``` ```php ImportVendor request('POST', 'https://api-sandbox.payabli.com/api/Import/vendorsForm/8cfec329267', [ 'multipart' => [ [ 'name' => 'file', 'filename' => '', 'contents' => null ] ] 'headers' => [ 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```csharp ImportVendor using RestSharp; var client = new RestClient("https://api-sandbox.payabli.com/api/Import/vendorsForm/8cfec329267"); var request = new RestRequest(Method.POST); request.AddHeader("requestToken", ""); request.AddParameter("undefined", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift ImportVendor import Foundation let headers = ["requestToken": ""] let parameters = [ [ "name": "file", "fileName": "" ] ] let boundary = "---011000010111000001101001" var body = "" var error: NSError? = nil for param in parameters { let paramName = param["name"]! body += "--\(boundary)\r\n" body += "Content-Disposition:form-data; name=\"\(paramName)\"" if let filename = param["fileName"] { let contentType = param["content-type"]! let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8) if (error != nil) { print(error as Any) } body += "; filename=\"\(filename)\"\r\n" body += "Content-Type: \(contentType)\r\n\r\n" body += fileContent } else if let paramValue = param["value"] { body += "\r\n\r\n\(paramValue)" } } let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Import/vendorsForm/8cfec329267")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data 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() ``` > If you're a software company, you're a payments company™