# 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 ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: Core API version: 1.0.0 paths: /api/{account_id}/product-families/: get: operationId: list-product-families summary: List Product Families description: List all product families for the account. tags: - subpackage_productFamilies parameters: - name: account_id in: path required: true schema: type: string - name: include_deleted in: query description: Include soft-deleted families required: false schema: type: boolean default: false - name: limit in: query description: Number of items per page required: false schema: type: integer default: 50 - name: offset in: query description: Number of items to skip required: false schema: type: integer default: 0 - name: filter in: query description: >- Filter conditions as key-value pairs or advanced filter objects (JSON string) required: false schema: type: string default: '{}' - name: sortBy in: query description: Field to sort by required: false schema: type: - string - 'null' - name: sortOrder in: query description: 'Sort order: 1 for ascending, -1 for descending' required: false schema: type: integer default: -1 - name: search in: query description: Keyword-based search across multiple fields required: false schema: type: - string - 'null' - name: Authorization in: header description: Bearer authentication required: true schema: type: string responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PaginatedResponse_ProductFamily_' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' servers: - url: https://app.paymentkit.com - url: https://staging.paymentkit.com components: schemas: ProductFamily: type: object properties: id: type: string account_id: type: string name: type: string description: type: - string - 'null' hierarchy: type: object additionalProperties: type: integer deleted_at: type: - string - 'null' format: date-time created_at: type: string format: date-time updated_at: type: string format: date-time required: - id - account_id - name - created_at - updated_at description: Pydantic model for product family responses. title: ProductFamily PaginatedResponse_ProductFamily_: type: object properties: items: type: array items: $ref: '#/components/schemas/ProductFamily' total: type: integer has_more: type: boolean required: - items - total - has_more title: PaginatedResponse_ProductFamily_ ValidationErrorLocItems: oneOf: - type: string - type: integer title: ValidationErrorLocItems ValidationError: type: object properties: loc: type: array items: $ref: '#/components/schemas/ValidationErrorLocItems' msg: type: string type: type: string required: - loc - msg - type title: ValidationError HTTPValidationError: type: object properties: detail: type: array items: $ref: '#/components/schemas/ValidationError' title: HTTPValidationError securitySchemes: HTTPBearer: type: http scheme: bearer ``` ## SDK Code Examples ```python from payment_kit import PaymentKit client = PaymentKit( token="YOUR_TOKEN_HERE", ) client.product_families.list_product_families( account_id="account_id", ) ``` ```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() ```