openapi: 3.1.0
info:
  title: Brands
  version: 2.0.0
  description: Provides details for the user's configured brands
  contact:
    name: Sendcloud API Support
    url: https://www.sendcloud.dev
    email: contact@sendcloud.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://panel.sendcloud.sc/api/v2
    description: Production
tags:
  - name: Brands
paths:
  /brands:
    get:
      x-sendcloud-paginated: true
      x-sendcloud-paginated-discriminator: brands
      summary: Retrieve a list of brands
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  next:
                    description: Url to retrieve the next page of brands
                    type: string
                    nullable: true
                  previous:
                    description: Url to retrieve the next page of brands
                    type: string
                    nullable: true
                  brands:
                    type: array
                    items:
                      $ref: '#/components/schemas/brand'
              examples:
                RetrieveAListOfBrands:
                  summary: Retrieve a list of brands
                  value:
                    next: null
                    previous: null
                    brands:
                      - id: 1
                        name: Sendcloud B.V
                        color: '#112857'
                        secondary_color: '#112855'
                        website: https://www.sendcloud.com
                        overlay_logo: {}
                        screen_logo:
                          url: https://media.sendcloud.sc/brands/1/Sendcloud.png
                        print_logo:
                          url: https://media.sendcloud.sc/brands/1/Sendcloud.png
                        overlay_thumb: {}
                        screen_thumb: https://media.sendcloud.sc/brands/1/a05d525e580da030907607d901e10288_thumbnail.png
                        print_thumb: https://media.sendcloud.sc/brands/1/a05d525e580da030907607d901e10288_thumbnail.png
                        notify_reply_to_email: info@sendcloud.com
                        domain: sendcloud-shop
                        notify_bcc_email: info@sendcloud.com
                        hide_powered_by: false
                        google_analytics_id: G-1234567890
                        features:
                          tracking_page: true
                          tracking_email: true
                          tracking_sms: false
                          tracking_whatsapp: false
                          returns_portal: true
                        customization_settings:
                          header:
                            faq_url: https://support.sendcloud.com/hc/en-us
                            contact_url: https://sendcloud.com/contact
                            shop_url: https://sendcloud.com/storefront
                            font_color: '#212121'
                            homepage_url: https://sendcloud.com
                            background_color: '#ffffff'
                          footer:
                            city: Eindhoven
                            street: Stadhuisplein
                            country: Netherlands
                            font_color: '#212121'
                            postal_code: 5611 EM
                            phone_number: '+310612345678'
                            social_media:
                              twitter: sendcloud
                              facebook: SendCloudNL
                              linkedin: sendcloud
                              instagram: sendcloud
                              pinterest: sendcloud
                            support_email: contact@sendcloud.com
                            background_color: '#ffffff'
                            whatsapp_business: '+310612345678'
      operationId: sc-public-v2-brands-get-all_user_brands
      security:
        - HTTPBasicAuth: []
        - OAuth2ClientCreds:
            - read:brand
      description: Retrieves a list of all brands and their associated properties.
      tags:
        - Brands
      x-mint:
        href: /api/v2/brands/retrieve-a-list-of-brands
        content: |-
          <Info>
            OAuth2 scopes required: `read:brand`. See [Scopes for OAuth apps](/api/v3/scopes).
          </Info>

          <Warning>
            **API v2 is entering maintenance mode.** New users should start with API v3 to access our latest features and improved performance. Already using v2? Don't worry, your current integration remains fully functional. Read more about [maintenance mode](/docs/getting-started/api-version-guide), or check out the [migration guide for API v3](/docs/getting-started/migration-guidelines-for-api-v3).
          </Warning>
  /brands/{id}:
    parameters:
      - schema:
          type: integer
          example: 1
          minimum: 1
        name: id
        in: path
        required: true
        description: The unique id of the user's configured brand
    get:
      summary: Retrieve a brand
      operationId: sc-public-v2-brands-get-user_brand_by_id
      security:
        - HTTPBasicAuth: []
        - OAuth2ClientCreds:
            - read:brand
      description: Retrieves a user's configured brand and its properties, identified by its unique ID
      x-mint:
        href: /api/v2/brands/retrieve-a-brand
        content: |-
          <Info>
            OAuth2 scopes required: `read:brand`. See [Scopes for OAuth apps](/api/v3/scopes).
          </Info>

          <Warning>
            **API v2 is entering maintenance mode.** New users should start with API v3 to access our latest features and improved performance. Already using v2? Don't worry, your current integration remains fully functional. Read more about [maintenance mode](/docs/getting-started/api-version-guide), or check out the [migration guide for API v3](/docs/getting-started/migration-guidelines-for-api-v3).
          </Warning>
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/brand'
              examples:
                RetrieveBrand:
                  summary: Retrieve a brand
                  value:
                    id: 1
                    name: Sendcloud B.V
                    color: '#112857'
                    secondary_color: '#112855'
                    website: https://www.sendcloud.com
                    overlay_logo: {}
                    screen_logo:
                      url: https://media.sendcloud.sc/brands/1/Sendcloud.png
                    print_logo:
                      url: https://media.sendcloud.sc/brands/1/Sendcloud.png
                    overlay_thumb: {}
                    screen_thumb: https://media.sendcloud.sc/brands/1/a05d525e580da030907607d901e10288_thumbnail.png
                    print_thumb: https://media.sendcloud.sc/brands/1/a05d525e580da030907607d901e10288_thumbnail.png
                    notify_reply_to_email: info@sendcloud.com
                    domain: sendcloud-shop
                    notify_bcc_email: info@sendcloud.com
                    hide_powered_by: false
                    google_analytics_id: G-1234567890
                    features:
                      tracking_page: true
                      tracking_email: true
                      tracking_sms: false
                      tracking_whatsapp: false
                      returns_portal: true
                    customization_settings:
                      header:
                        faq_url: https://support.sendcloud.com/hc/en-us
                        shop_url: https://sendcloud.com/storefront
                        font_color: '#212121'
                        contact_url: https://sendcloud.com/contact
                        homepage_url: https://sendcloud.com
                        background_color: '#ffffff'
                      footer:
                        city: Eindhoven
                        street: Stadhuisplein
                        country: Netherlands
                        font_color: '#212121'
                        postal_code: 5611 EM
                        phone_number: '+310612345678'
                        social_media:
                          twitter: sendcloud
                          facebook: SendCloudNL
                          linkedin: sendcloud
                          instagram: sendcloud
                          pinterest: sendcloud
                        support_email: contact@sendcloud.com
                        background_color: '#ffffff'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        description: HTTP error code
                        example: 404
                      request:
                        type: string
                        description: Endpoint URL that was requested
                        example: api/v2/brands/184
                      message:
                        type: string
                        description: A human readable error message
                        example: No Brand matches the given query.
              examples:
                NotFound:
                  summary: Not Found
                  value:
                    error:
                      code: 404
                      request: api/v2/brands/184
                      message: No Brand matches the given query.
      tags:
        - Brands
components:
  securitySchemes:
    HTTPBasicAuth:
      type: http
      description: Basic Authentication using API key and secrets is currently the main authentication mechanism.
      scheme: basic
    OAuth2ClientCreds:
      type: oauth2
      description: OAuth2 is a standardized protocol for authorization that allows users to share their private resources stored on one site with another site without having to provide their credentials. OAuth2 Client Credentials Grant workflow. This workflow is typically used for server-to-server interactions that require authorization to access specific resources.
      flows:
        clientCredentials:
          tokenUrl: https://account.sendcloud.com/oauth2/token/
          scopes:
            read:analytics: View your shipping analytics
            read:audit-log: View your account's audit log
            read:brand: View your brands
            write:brand: Manage your brands
            write:carrier: Configure carriers and contracts
            read:checkout: View your dynamic checkout configurations and templates
            read:event-subscription: View your event subscriptions
            write:event-subscription: Create and manage your event subscriptions
            read:integration: View your integrations
            write:integration: Connect and manage integrations
            read:invoice: View your invoices
            read:notification: View your notifications
            write:notification: Manage your notifications
            read:operational-settings: View your warehouses, shipping lanes, and other operational settings
            write:operational-settings: Manage your warehouses, shipping lanes, and other operational settings
            read:order: View your orders
            write:order: Import and process your orders
            read:organization: View organization settings
            write:organization: Change organization settings
            read:parcel: View your shipments and their tracking status
            write:parcel: Create, announce, and cancel shipments
            read:pickup: View carrier pickups and the options available for scheduling them
            write:pickup: Schedule and manage carrier pickups
            read:price: View shipping prices
            write:product: Manage your product catalog
            read:return: View your returns
            write:return: Create and manage returns
            read:return-settings: View your return settings
            write:return-settings: Configure your return settings
            read:service-point: View carrier service points
            read:shipping-method: View shipping methods, products and prices
            read:shipping-rule: View your shipping rules
            write:shipping-rule: Create and manage shipping rules
            read:support-ticket: View your support tickets
            write:support-ticket: Manage your support tickets
            read:tracking-message: View your tracking notifications
            write:tracking-message: Manage your tracking notifications
            read:tracking-page: View your tracking page
            write:tracking-page: Customize your tracking page
            read:user: Read your basic account information
  schemas:
    brand:
      description: A user's configured brand within Sendcloud
      type: object
      title: Brand Object
      properties:
        id:
          type: integer
          minimum: 1
          example: 1
          description: The unique identifier of the brand
          readOnly: true
        name:
          type: string
          minLength: 1
          description: The brand name
          example: Sendcloud B.V
        color:
          type: string
          minLength: 7
          description: Hex code of the primary brand color
          example: '#112857'
          maxLength: 7
          pattern: ^#[a-fA-F0-9]{6}
        secondary_color:
          type: string
          minLength: 7
          description: Hex code of the secondary brand color
          example: '#112855'
          maxLength: 7
          pattern: ^#[a-fA-F0-9]{6}
        website:
          type: string
          minLength: 1
          format: uri
          example: https://www.sendcloud.com
          description: The website of the specific brand, usually used for display purposes
        screen_logo:
          type: object
          description: The brand's logo used for display purposes
          minProperties: 0
          maxProperties: 1
          properties:
            url:
              type: string
              format: uri
              example: https://media.sendcloud.sc/brands/1/Sendcloud.png
        overlay_logo:
          type: object
          enum:
            - {}
          description: Deprecated. Returns an empty object to not break backward compatibility
          deprecated: true
        print_logo:
          type: object
          description: The brand's logo used for printing purposes (e.g. labels)
          minProperties: 0
          maxProperties: 1
          properties:
            url:
              type: string
              format: uri
              example: https://media.sendcloud.sc/brands/1/Sendcloud.png
        overlay_thumb:
          type: object
          enum:
            - {}
          nullable: true
          description: Deprecated. Returns an empty object to not break backward compatibility
          deprecated: true
        screen_thumb:
          type: string
          nullable: true
          format: uri
          example: https://media.sendcloud.sc/brands/1/a05d525e580da030907607d901e10288_thumbnail.png
          description: Thumbnail of the screen logo
        print_thumb:
          type: string
          nullable: true
          example: https://media.sendcloud.sc/brands/1/a05d525e580da030907607d901e10288_thumbnail.png
          format: uri
          description: Thumbnail of the print logo
        notify_reply_to_email:
          type: string
          nullable: true
          format: email
          example: info@sendcloud.com
          description: Email address used for `reply to` actions for tracking email notifications
        domain:
          type: string
          minLength: 1
          description: A user-defined domain for use with the tracking page and the return portal features.
          example: sendcloud-shop
        notify_bcc_email:
          type: string
          nullable: true
          example: info@sendcloud.com
          format: email
          description: '[BCC email](https://en.wikipedia.org/wiki/Blind_carbon_copy) address used for `reply to` actions for tracking email notifications'
        hide_powered_by:
          type: boolean
          description: Indicates if the "powered by Sendcloud" message should be displayed on features which display the user's brand, such as the tracking page
          default: false
        google_analytics_id:
          type: string
          example: G-1234567890
          pattern: ^G-\d{10}$
          description: A user-defined string representing the Google Analytics ID
          maxLength: 15
        features:
          type: object
          description: List of features activated for the brand
          properties:
            tracking_page:
              type: boolean
              description: True if the tracking page is published, false otherwise
            tracking_email:
              type: boolean
              description: True if the Tracking email feature is active and the brand has at least one email template active, false otherwise
            tracking_sms:
              type: boolean
              description: True if Tracking SMS feature is active and the brand has at least one SMS template active, false otherwise
            tracking_whatsapp:
              type: boolean
              description: True if Tracking WhatsApp feature is active and the brand has at least one WhatsApp template active, false otherwise
            returns_portal:
              type: boolean
              description: True if the returns portal is active, false otherwise
        customization_settings:
          type: object
          nullable: true
          description: Header and footer customization settings for the brand
          properties:
            header:
              type: object
              nullable: true
              description: Indicates information to be shown in the header of the tracking pages and return portal
              properties:
                faq_url:
                  type: string
                  example: https://support.sendcloud.com/hc/en-us
                  format: uri
                  description: Link to the shop's FAQ
                contact_url:
                  type: string
                  example: https://sendcloud.com/contact
                  format: uri
                  description: Link to the shop's contact page
                shop_url:
                  type: string
                  example: https://sendcloud.com/storefront
                  format: uri
                  description: Link to the webshop
                font_color:
                  type: string
                  example: '#212121'
                  description: Font colour to be used for displaying header information
                homepage_url:
                  type: string
                  example: https://sendcloud.com
                  format: uri
                  description: Link to the shop's homepage
                background_color:
                  type: string
                  example: '#ffffff'
                  description: Background colour to be used for displaying header information
            footer:
              type: object
              description: Indicates information to be shown in the footer of the tracking page and return portal
              properties:
                city:
                  type: string
                  example: Eindhoven
                street:
                  type: string
                  example: Stadhuisplein
                country:
                  type: string
                  example: Netherlands
                font_color:
                  type: string
                  example: '#212121'
                postal_code:
                  type: string
                  example: 5611EM
                phone_number:
                  type: string
                  example: '+310612345678'
                social_media:
                  type: object
                  description: Social media handle of the shop. The absolute URLs are not sent.
                  properties:
                    twitter:
                      type: string
                      example: sendcloud
                      description: The Twitter handle of the webshop
                    facebook:
                      type: string
                      example: SendCloudNL
                      description: The Facebook handle of the webshop
                    linkedin:
                      type: string
                      example: sendcloud
                      description: The LinkedIn handle of the webshop
                    instagram:
                      type: string
                      example: sendcloud
                      description: The Instagram handle of the webshop
                    pinterest:
                      type: string
                      example: sendcloud
                      description: The Pinterest handle of the webshop
                support_email:
                  type: string
                  example: contact@sendcloud.com
                  format: email
                  description: An email address for the shop's customer support
                background_color:
                  type: string
                  example: '#ffffff'
                  description: Background colour to be used for displaying footer information
                whatsapp_business:
                  type: string
                  description: The WhatsApp contact number of the business/brand.
                  example: '+310612345678'
      required:
        - id
        - name
        - domain
        - features
