Rye

Rye Brands API

The Brands API from Rye — 1 operation(s) for brands.

OpenAPI Specification

rye-brands-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Universal Checkout Betas Brands API
  version: 1.0.5
  description: 'Turn any product URL into a completed checkout. Instantly retrieve price, tax, and shipping for any product, and let users buy without ever leaving your native AI experience.


    View the [Rye API docs](https://docs.rye.com).'
  termsOfService: https://rye.com/terms-of-service
  license:
    name: UNLICENSED
  contact:
    name: Rye
    email: dev@rye.com
    url: https://docs.rye.com
servers:
- url: https://staging.api.rye.com
tags:
- name: Brands
paths:
  /api/v1/brands/domain/{domain}:
    get:
      operationId: GetBrandByDomain
      responses:
        '200':
          description: Brand information including marketplace classification
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Brand'
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuntimeError'
      description: 'Retrieve brand information by domain name


        Look up a brand by its domain name (e.g. "aloyoga.com" or "www.amazon.com").

        Returns brand information including the marketplace type if the lookup succeeds.'
      summary: Retrieve brand
      tags:
      - Brands
      security:
      - bearerAuth:
        - checkout_intents:read
      parameters:
      - description: The domain name to look up (e.g. "aloyoga.com", "www.amazon.com")
        in: path
        name: domain
        required: true
        schema:
          $ref: '#/components/schemas/Domain'
      x-codeSamples:
      - lang: JavaScript
        source: "import CheckoutIntents from 'checkout-intents';\n\nconst client = new CheckoutIntents({\n  apiKey: process.env['CHECKOUT_INTENTS_API_KEY'], // This is the default and can be omitted\n});\n\nconst brand = await client.brands.retrieve('shop.aloyoga.com');\n\nconsole.log(brand.id);"
      - lang: Python
        source: "import os\nfrom checkout_intents import CheckoutIntents\n\nclient = CheckoutIntents(\n    api_key=os.environ.get(\"CHECKOUT_INTENTS_API_KEY\"),  # This is the default and can be omitted\n)\nbrand = client.brands.retrieve(\n    \"shop.aloyoga.com\",\n)\nprint(brand.id)"
      - lang: Java
        source: "package com.rye.example;\n\nimport com.rye.client.CheckoutIntentsClient;\nimport com.rye.client.okhttp.CheckoutIntentsOkHttpClient;\nimport com.rye.models.brands.BrandRetrieveParams;\nimport com.rye.models.brands.BrandRetrieveResponse;\n\npublic final class Main {\n    private Main() {}\n\n    public static void main(String[] args) {\n        CheckoutIntentsClient client = CheckoutIntentsOkHttpClient.fromEnv();\n\n        BrandRetrieveResponse brand = client.brands().retrieve(\"shop.aloyoga.com\");\n    }\n}"
      - lang: cURL
        source: "curl https://staging.api.rye.com/api/v1/brands/domain/$DOMAIN \\\n    -H \"Authorization: Bearer $CHECKOUT_INTENTS_API_KEY\""
components:
  schemas:
    AuthenticationError:
      properties:
        name:
          type: string
        message:
          type: string
        stack:
          type: string
      required:
      - name
      - message
      type: object
      additionalProperties: false
    ValidateError:
      properties:
        name:
          type: string
        message:
          type: string
        stack:
          type: string
        status:
          type: number
          format: double
        fields:
          $ref: '#/components/schemas/FieldErrors'
      required:
      - name
      - message
      - status
      - fields
      type: object
      additionalProperties: false
    Marketplace:
      enum:
      - AMAZON
      - SHOPIFY
      - BESTBUY
      - SEPHORA
      - UNKNOWN
      type: string
    Domain:
      type: string
      example: shop.aloyoga.com
      format: hostname
      description: Represents a valid domain name string.
      pattern: ^(?=.{1,253}$)(?!\-)([a-zA-Z0-9\-]{1,63}(?<!\-)\.)+[a-zA-Z]{2,63}$
    Brand:
      properties:
        supported:
          type: boolean
          description: 'If `false`, then products from this brand cannot be purchased through the

            Sell Anything API.'
        marketplace:
          $ref: '#/components/schemas/Marketplace'
          description: Indicates what ecommerce platform the brand uses.
        id:
          type: string
          description: A unique identifier for the brand.
      required:
      - supported
      - marketplace
      - id
      type: object
    RuntimeError:
      properties:
        name:
          type: string
        message:
          type: string
        stack:
          type: string
      required:
      - name
      - message
      type: object
      additionalProperties: false
    FieldErrors:
      properties: {}
      type: object
      additionalProperties:
        properties:
          value: {}
          message:
            type: string
        required:
        - message
        type: object
    NotFoundError:
      properties:
        name:
          type: string
        message:
          type: string
        stack:
          type: string
      required:
      - name
      - message
      type: object
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Rye API key