openapi: 3.0.3 info: title: Anrok Customer certificates Products API version: '1.1' termsOfService: https://www.anrok.com/privacy-terms contact: email: support@anrok.com license: name: All rights reserved url: https://www.anrok.com x-logo: url: https://global-uploads.webflow.com/632add85afcd1ac30aa74675/6357842d130e1f3e0e23d1fe_anrok_logo.svg description: '# API reference The Anrok API server is accessible at `https://api.anrok.com`. All requests are HTTP POSTs with JSON in the body. Authentication is via an HTTP header `Authorization: Bearer {apiKey}`. The default rate limit for a seller account is 10 API requests per second. ' servers: - url: https://api.anrok.com security: - http: [] tags: - name: Products description: 'The Anrok Products API endpoints allow you to manage the products on your seller account. Each product is identified by an external ID and is assigned a product tax category (PTC) which determines the product''s taxability in each jurisdiction. PTCs may be one of Anrok''s standard PTCs or a custom PTC that has been created on your seller account. ' paths: /v1/seller/products/create: post: tags: - Products summary: Create product description: Creates a new product in Anrok, given a unique external ID and a product tax category (PTC) which determines the product's taxability in each jurisdiction. operationId: productsCreate requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateProduct' example: externalId: sku-1001 taxCategoryId: type: standard id: saasBusiness name: Pro plan description: Monthly subscription to the Pro plan. required: true responses: '200': $ref: '#/components/responses/EmptyResponse' '400': description: Bad Request content: application/json: schema: type: string examples: missingRequiredProperty: value: 'Request body: "externalId": Required.' summary: Missing required property '409': description: Conflict content: application/json: schema: type: object properties: type: type: string enum: - externalIdAlreadyExists - externalIdInvalid - taxCategoryIdNotFound message: description: When `type` is `externalIdInvalid`, a human-readable message describing why the external ID is invalid. type: string required: - type example: type: externalIdAlreadyExists '429': $ref: '#/components/responses/RateLimit' /v1/seller/products/externalId:{externalId}/get: parameters: - $ref: '#/components/parameters/ProductExternalId' post: tags: - Products summary: Get product description: Looks up a product in Anrok by its external ID. Returns the product's external ID, tax category, name, and description. operationId: productsGet requestBody: $ref: '#/components/requestBodies/Empty' responses: '200': description: OK content: application/json: schema: type: object properties: externalId: description: The product's external ID. type: string examples: - sku-1001 taxCategoryId: description: The identifier for the product's product tax category (PTC). $ref: '#/components/schemas/ProductTaxCategoryId' name: description: The product's display name. type: string examples: - Pro plan description: description: The product's description. Empty string if no description has been set. type: string examples: - Monthly subscription to the Pro plan. required: - externalId - taxCategoryId - name - description '409': description: Conflict content: application/json: schema: type: object properties: type: type: string enum: - productExternalIdNotFound example: type: productExternalIdNotFound '429': $ref: '#/components/responses/RateLimit' /v1/seller/productTaxCategories/list: post: tags: - Products summary: List product tax categories description: Lists all product tax categories (PTCs) that are available on the seller account. This includes the standard PTCs that Anrok has enabled for the seller as well as any custom PTCs that have been created on the seller account. The returned IDs may be used as the `taxCategoryId` when creating a product. operationId: productTaxCategoriesList requestBody: $ref: '#/components/requestBodies/Empty' responses: '200': description: OK content: application/json: schema: type: object properties: productTaxCategories: description: The list of all available product tax categories. type: array items: type: object properties: id: $ref: '#/components/schemas/ProductTaxCategoryId' name: description: The display name of the product tax category. type: string examples: - SaaS - General, B2B required: - id - name required: - productTaxCategories example: productTaxCategories: - id: type: standard id: saasBusiness name: SaaS - General, B2B - id: type: custom id: sptc95hf85bdcd name: Custom Professional Services '429': $ref: '#/components/responses/RateLimit' components: responses: EmptyResponse: description: OK content: application/json: schema: type: object example: {} RateLimit: description: Too Many Requests headers: Retry-After: description: Number of seconds to wait for rate limit to reset. schema: type: integer content: text/plain: schema: type: string example: You've exceeded your API limit of 10 per second parameters: ProductExternalId: name: externalId in: path description: The external ID of the product. required: true schema: type: string schemas: ProductTaxCategoryId: description: Identifier for a product tax category (PTC), consisting of a `type` and `id`. A PTC may be one of the standard PTCs that Anrok provides or a custom PTC that has been created on your seller account. type: object properties: type: description: Whether this PTC is one of Anrok's standard PTCs or a custom PTC defined on your seller account. type: string enum: - standard - custom id: description: The ID of the PTC. For a standard PTC, this is an Anrok internal identifier (for example, `saasBusiness`). For a custom PTC, this is the ID assigned when the PTC was created on the seller account. type: string examples: - saasBusiness - sptc95hf85bdcd required: - type - id CreateProduct: type: object properties: externalId: description: Your unique identifier for this product. The external ID may contain only alphanumeric characters, spaces, and `.-_:`. It must not contain leading or trailing spaces or consecutive spaces. type: string examples: - sku-1001 taxCategoryId: description: Identifier for the product tax category (PTC), consisting of a `type` and `id`, to assign to this product. A PTC may be one of the standard PTCs that Anrok provides or a custom PTC that has been created on your seller account. Use the [List product tax categories endpoint](#tag/Products/operation/productTaxCategoriesList) to list the PTCs that are available on your seller account. $ref: '#/components/schemas/ProductTaxCategoryId' name: description: The product's display name. type: string examples: - Pro plan description: description: Optional description of the product. type: string nullable: true examples: - Monthly subscription to the Pro plan. required: - externalId - taxCategoryId - name requestBodies: Empty: content: application/json: schema: type: object examples: emptyExample: value: {} summary: Empty request body required: true securitySchemes: http: type: http description: 'The Anrok API uses API keys to authenticate requests. You can view and manage your API keys in [Anrok](https://app.anrok.com/-/api-keys). Use an Authorization header in the format `Bearer {apiKey}` to authenticate Anrok API requests. ' scheme: Bearer externalDocs: description: API Tutorials url: https://apidocs.anrok.com/tutorials