> ## Documentation Index
> Fetch the complete documentation index at: https://docs.appcharge.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get All Badges

> Retrieves a list of all badges.

```bash Get All Badges theme={"system"}
curl -X GET \
  'https://api.appcharge.com/components/v1/badge' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'x-publisher-token: <x-publisher-token>'
```

```json Get All Badges theme={"system"}
[
    {
      "id": "507f1f77bcf86cd799439011",
      "name": "New Item",
      "publisherBadgeId": "new_item",
      "type": "emblem",
      "badgeImageId": "507f1f77bcf86cd799439011",
      "badgeImageUrl": "https://media.appcharge.com/media/69133d595af23405d8e843a5"
    },
    {
      "id": "507f1f77bcf86cd799439013",
      "name": "Limited Offer",
      "publisherBadgeId": "limited_offer",
      "type": "emblem",
      "badgeImageUrl": "https://images.pexels.com/photos/limited-offer.png"
    },
    {
      "id": "507f1f77bcf86cd799439012",
      "name": "New Year Celebration",
      "publisherBadgeId": "new_year_celebration",
      "type": "ribbon",
      "badgeImageUrl": "https://images.pexels.com/photos/new-years.png",
      "text": "New Year Sale",
      "backgroundColor": {
        "colorOne": "#00c6ff",
        "colorTwo": "#0072ff",
        "gradientDirection": "to right"
      },
      "textColor": {
        "colorOne": "#ffffff"
      }
    }
]
```


## OpenAPI

````yaml openapi-badges-api.json GET /components/v1/badge
openapi: 3.0.3
info:
  title: Badges API
  version: 1.0.0
servers:
  - url: https://api-sandbox.appcharge.com
security:
  - PublisherTokenAuth: []
tags:
  - name: Badges
paths:
  /components/v1/badge:
    get:
      tags:
        - Badges
      description: >-
        Retrieves a list of all badges.


        For emblem badges, the response includes `badgeImageUrl`. When the image
        is linked to an asset, `badgeImageId` is also returned.
      responses:
        '200':
          description: Badges retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAllBadgesResponse'
components:
  schemas:
    GetAllBadgesResponse:
      type: object
      properties:
        getAllBadgesResponse:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Badge ID.
                example: 507f1f77bcf86cd799439011
              name:
                type: string
                description: Badge name.
                example: New Year Celebration
              publisherBadgeId:
                type: string
                description: Badge ID that you defined.
                example: new_year_celebration
              type:
                type: string
                enum:
                  - emblem
                  - ribbon
                description: Badge type.
                example: ribbon
              badgeImageId:
                type: string
                description: >-
                  Asset ID of the badge image. Save this value to reuse the same
                  asset in future create or update requests. Only present for
                  emblem badges when the image is linked to an asset.
                example: 507f1f77bcf86cd799439011
              badgeImageUrl:
                type: string
                format: url
                description: >-
                  Badge image URL. For uploaded files, this is the
                  Appcharge-hosted CDN URL. For external image URLs, this is the
                  original image URL served from the provided URL. For emblem
                  badges, returned alongside `badgeImageId` when the image is
                  linked to an asset.
                example: https://media.appcharge.com/media/69133d595af23405d8e843a5
              text:
                type: string
                description: >-
                  Text displayed on ribbon badge. Only present for ribbon
                  badges.
                example: New Year Sale
              backgroundColor:
                allOf:
                  - $ref: '#/components/schemas/BackgroundColorGradient'
                  - description: Background color details. Only present for ribbon badges.
                    example:
                      colorOne: '#00c6ff'
                      colorTwo: '#0072ff'
                      gradientDirection: to right
              textColor:
                type: object
                description: Text color. Only present for ribbon badges.
                properties:
                  colorOne:
                    type: string
                    pattern: ^#[0-9a-fA-F]{6}$
                    description: Text color in hex format.
                    example: '#ffffff'
    BackgroundColorGradient:
      type: object
      properties:
        colorOne:
          type: string
          default: '#000000'
          pattern: ^#[0-9a-fA-F]{6}$
          description: Primary gradient color in hex format.
          example: '#00c6ff'
        colorTwo:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
          description: Secondary gradient color in hex format.
          example: '#0072ff'
        gradientDirection:
          type: string
          enum:
            - to bottom
            - to top
            - to right
            - to left
            - to bottom right
            - to top left
            - to bottom left
            - to top right
          default: to bottom
          description: Direction of gradient transition between `colorOne` and `colorTwo`.
          example: to right
  securitySchemes:
    PublisherTokenAuth:
      type: apiKey
      in: header
      name: x-publisher-token
      description: Publisher token, as displayed in the Publisher Dashboard.

````