> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.paymentkit.com/api-reference/api-reference/product-families/list-product-families/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.paymentkit.com/_mcp/server. # List Product Families GET https://app.paymentkit.com/api/{account_id}/product-families/ List all product families for the account. Reference: https://docs.paymentkit.com/api-reference/api-reference/product-families/list-product-families ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Servers - `https://app.paymentkit.com` (Production, default) - `https://staging.paymentkit.com` (Staging) ## Request ### Path parameters - `account_id` (string, required) ### Query parameters - `include_deleted` (boolean, optional, default: false) — Include soft-deleted families - `limit` (integer, optional, default: 50) — Number of items per page - `offset` (integer, optional, default: 0) — Number of items to skip - `filter` (string, optional, default: {}) — Filter conditions as key-value pairs or advanced filter objects (JSON string) - `sortBy` (string, optional, nullable) — Field to sort by - `sortOrder` (integer, optional, default: -1) — Sort order: 1 for ascending, -1 for descending - `search` (string, optional, nullable) — Keyword-based search across multiple fields ## Response ### 200 Successful Response - `items` (list of ProductFamily, required) - `total` (integer, required) - `has_more` (boolean, required) ## Errors ### 422 Unprocessable Entity Error Validation Error - `detail` (list of ValidationError, optional) ## Types ### ProductFamily Pydantic model for product family responses. - `id` (string, required) - `account_id` (string, required) - `name` (string, required) - `created_at` (datetime, required) - `updated_at` (datetime, required) - `description` (string, optional, nullable) - `hierarchy` (map from string to integer, optional) - `deleted_at` (datetime, optional, nullable) ### ValidationError - `loc` (list of ValidationErrorLocItems, required) - `msg` (string, required) - `type` (string, required) ### ValidationErrorLocItems ## Examples **Request** ```json {} ``` **Response** ```json { "items": [ { "id": "pf_8a7b3c2d4e5f6g7h8i9j0k", "account_id": "acct_1234567890abcdef", "name": "Electronics", "created_at": "2023-11-01T12:00:00Z", "updated_at": "2024-01-10T15:45:00Z", "description": "Product family for all electronic devices and accessories", "hierarchy": { "level1": 1, "level2": 3 }, "deleted_at": "2024-01-15T09:30:00Z" } ], "total": 1, "has_more": true } ``` **SDK Code** ```python import requests url = "https://app.paymentkit.com/api/account_id/product-families/" payload = {} headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.get(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://app.paymentkit.com/api/account_id/product-families/'; const options = { method: 'GET', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://app.paymentkit.com/api/account_id/product-families/" payload := strings.NewReader("{}") req, _ := http.NewRequest("GET", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://app.paymentkit.com/api/account_id/product-families/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://app.paymentkit.com/api/account_id/product-families/") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('GET', 'https://app.paymentkit.com/api/account_id/product-families/', [ 'body' => '{}', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://app.paymentkit.com/api/account_id/product-families/"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://app.paymentkit.com/api/account_id/product-families/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" 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() ```