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

# List ledger entries

> List a connected shop's Etsy payment account ledger, entry by entry: every sale, fee, tax, refund, advertising fee and payout, with the balance after each and the order it belongs to.

**Cost:** 1 API credit per page.

```bash
curl -G "https://api.alura.io/v1/workspace/ledger" \
  -H "Authorization: Bearer $ALURA_API_KEY" \
  --data-urlencode "shop_id=22841907" \
  --data-urlencode "after=0"
```

One shop per call: `shop_id` is optional only when the workspace has one connected shop. A shop outside the workspace answers `404`. The key needs the `workspace:read` and `orders:read` scopes. This endpoint is REST only and takes an [API key](https://docs.alura.io/authentication.md), which only a workspace owner or admin can create. It is not available to AI assistants over an MCP connection.

## Read the whole ledger

Entries come in Etsy's order, by `sequence_number`, up to 1,000 a page. Set `after` to the last `sequence_number` you read and call again until a page comes back empty. `next_cursor` also works, but stops after 10,000 entries. `after` never does.

Store entries by `id` and upsert: a later sync can rewrite an entry. Read the whole shop again from `after=0` now and then. `summary.as_of` is when the shop's finances last synced in full, and a shop whose finances have not synced in full in the last 7 days, or ever, gets the `stale_shops` notice. The [ledger guide](https://docs.alura.io/guides/your-shop-ledger.md) has the full recipe.

## Tie entries to orders

| `order_link` | Means |
| - | - |
| `order` | `order_id` is an order of this shop. |
| `listing` | The entry is about a listing and no order, such as a listing fee or a renewal after a sale. `listing_id` is set. |
| `none` | The entry references neither an order nor a listing, such as an advertising fee or a payout. |
| `unknown` | Alura can't tie the entry to an order yet. Read it again later. |

> [!NOTE]
>
> `unknown` never means "no order". An order's sum is final only once its refunds have had time to arrive: a transaction fee refund can come a day or more after the refund it belongs to.

## Money

`amount` and `balance` are in the entry's own `currency`. When the payment account changed currency, the running balance does not carry across the change. Amounts are served for AUD, CAD, CHF, DKK, EUR, GBP, HKD, ILS, INR, MAD, MXN, MYR, NOK, NZD, PHP, SEK, TRY, USD and ZAR. Every other currency has `amount` and `balance` `null` and `amount_error: "currency_unknown"`: Alura has not verified how Etsy counts it in the ledger, and never guesses.

> [accordion] A page that stops early
>
> A page stops before sequence numbers Alura has not stored, with `has_more: false` and `next_cursor: null`, so continue by `after`. `summary.not_stored` names them, and so does a notice:
>
> | Notice | Means |
> | - | - |
> | `ledger_gap` | Entries are stored on both sides of the missing range. Read again later from the same `after`. |
> | `ledger_history_pending` | Nothing is stored up to the range yet, as while a shop's older history is still being fetched. Read from `after=0` again later. |
>
> `not_stored.after` skips the range on purpose. A `ledger_unsequenced` notice means the shop has entries Etsy sent without a sequence number, which no page serves.

> [accordion] Totals and empty pages
>
> `total` is a lower bound (`"relation": "gte"`): the ledger is not counted. An empty page is free.

For shop totals over a range, use [Get shop stats](https://docs.alura.io/api-reference/workspace/stats/get.md).


## OpenAPI

````yaml /openapi.json get /v1/workspace/ledger
openapi: 3.1.0
info:
  title: Alura API
  version: 1.0.0
  description: Etsy market research for scripts and AI assistants.
servers:
  - url: https://api.alura.io
security:
  - apiKey: []
paths:
  /v1/workspace/ledger:
    get:
      summary: List ledger entries
      description: >-
        One connected Etsy shop's payment account ledger, entry by entry, in
        Etsy's order: every sale, fee, tax, refund, advertising fee and payout
        as Etsy booked it, with the balance after each. Each entry says which
        order it belongs to (`order_id`, `order_link`), so you can add up what
        an order earned after Etsy's fees, taxes and refunds. Read it like this.
        Page with `after` set to the last `sequence_number` you read
        (`next_cursor` stops after 10,000 entries). Store entries by `id` and
        upsert: a later sync can rewrite an entry. Read the shop again from
        `after=0` now and then. A page stops before sequence numbers Alura has
        not stored, with `has_more: false` and `next_cursor: null` (continue by
        `after`), and says so in `not_stored` with a `ledger_gap` notice, or
        `ledger_history_pending` while older history is still arriving: read
        again later rather than skipping them. An entry with `order_link:
        "unknown"` may be tied to its order later: read it again. Count an order
        as final only once its refunds have had time to arrive (a refund's
        transaction fee refund can come a day or more after the refund).
        `balance` is in the entry's own currency, so the running balance does
        not carry across a change of the payment account's currency. Entries
        with `order_link: "listing"` are per-listing fees, to attribute by
        `listing_id`. `summary.as_of` is when the shop's finances last synced in
        full, and a shop whose finances have not synced in full in the last 7
        days, or ever, gets the `stale_shops` notice. Needs an API key with the
        `workspace:read` and `orders:read` scopes. REST only: API keys are
        created by a workspace owner or admin, and AI assistants cannot reach
        this endpoint over an MCP connection. Costs 1 API credit per page with
        entries; an empty page and an error are free.


        Cost: 1 API credit per page.
      operationId: workspace.ledger.list
      parameters:
        - name: shop_id
          in: query
          required: false
          description: >-
            The Etsy shop ID of one of the workspace's connected shops; optional
            when the workspace has one.
          schema:
            description: >-
              The Etsy shop ID of one of the workspace's connected shops;
              optional when the workspace has one.
            type: string
            pattern: ^[0-9]{1,20}$
            example: '22841907'
        - name: after
          in: query
          required: false
          description: >-
            Serve the entries after this sequence number; default 0, the start
            of the ledger. Page by setting it to the last `sequence_number` you
            read: `next_cursor` stops after 10,000 entries, `after` never does.
          schema:
            description: >-
              Serve the entries after this sequence number; default 0, the start
              of the ledger. Page by setting it to the last `sequence_number`
              you read: `next_cursor` stops after 10,000 entries, `after` never
              does.
            type: string
            pattern: ^\d{1,10}$
        - name: limit
          in: query
          required: false
          description: >-
            Page size: at most 1000, the default. A larger whole number gets
            1000 rows and `limit_applied`.
          schema:
            type: integer
            minimum: 1
        - name: cursor
          in: query
          required: false
          description: >-
            The `next_cursor` of the previous page. Bound to the query, the
            workspace and the key.
          schema:
            type: string
        - name: fields
          in: query
          required: false
          description: >-
            Comma-separated dotted paths to return; `id`, `object` and `as_of`
            always come back.
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers:
            Request-Id:
              $ref: '#/components/headers/Request-Id'
            Alura-Credits-Cost:
              $ref: '#/components/headers/Alura-Credits-Cost'
            Alura-Credits-Remaining:
              $ref: '#/components/headers/Alura-Credits-Remaining'
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: list
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        object:
                          type: string
                          const: ledger_entry
                        id:
                          type: string
                          description: >-
                            Etsy's ledger entry ID. A later sync can rewrite an
                            entry: store entries by `id` and upsert.
                        shop_id:
                          type: string
                        ledger_id:
                          description: >-
                            Etsy's ID of the payment account ledger the entry is
                            in; a shop's entries normally share one.
                          type:
                            - string
                            - 'null'
                        sequence_number:
                          type: integer
                          description: >-
                            The entry's place in the shop's ledger, counted by
                            Etsy from 1. Entries are served in this order.
                        created_at:
                          anyOf:
                            - type: string
                              format: date-time
                              pattern: >-
                                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                            - type: 'null'
                          description: >-
                            When Etsy recorded the entry; null when Etsy gave no
                            time.
                        type:
                          description: >-
                            Etsy's `ledger_type`, as Etsy sends it
                            (`transaction`, `PAYMENT_GROSS`, `offsite_ads_fee`,
                            ...).
                          type:
                            - string
                            - 'null'
                        reference_type:
                          description: 'Etsy''s `reference_type`: what `reference_id` names.'
                          type:
                            - string
                            - 'null'
                        reference_id:
                          description: >-
                            Etsy's `reference_id`: a receipt, transaction,
                            payment, adjustment or listing ID, by
                            `reference_type`.
                          type:
                            - string
                            - 'null'
                        order_id:
                          description: >-
                            The Etsy receipt ID of the order the entry belongs
                            to, when `order_link` is `order`; null otherwise.
                          type:
                            - string
                            - 'null'
                        order_link:
                          type: string
                          enum:
                            - order
                            - listing
                            - none
                            - unknown
                          description: >-
                            `order`: `order_id` is an order of this shop.
                            `listing`: the entry is about a listing and no order
                            (listing fees, renewals after a sale; `listing_id`
                            is set), to attribute by listing. `none`: the entry
                            references neither an order nor a listing
                            (advertising fees, payouts, VAT on seller fees,
                            which is still a cost of selling). `unknown`: Alura
                            cannot tie this entry to an order yet (an entry type
                            it has not verified, or an order it does not hold);
                            read it again later, never treat it as "no order".
                        transaction_id:
                          description: >-
                            The Etsy transaction (order line) the entry is
                            about, for transaction fees and their refunds; null
                            otherwise.
                          type:
                            - string
                            - 'null'
                        listing_id:
                          description: >-
                            The listing the entry is about, when `order_link` is
                            `listing`; null otherwise.
                          type:
                            - string
                            - 'null'
                        currency:
                          description: >-
                            The entry's own currency, the payment account's at
                            the time (ISO 4217); null when Etsy gave none.
                          type:
                            - string
                            - 'null'
                        amount:
                          anyOf:
                            - type: object
                              properties:
                                amount:
                                  type: string
                                  description: >-
                                    A decimal string with the currency's
                                    decimals; negative for a loss or a negative
                                    balance.
                                currency:
                                  type: string
                                  description: ISO 4217 code.
                              required:
                                - amount
                                - currency
                              additionalProperties: false
                            - type: 'null'
                          description: >-
                            What the entry added to the balance (negative for a
                            fee or a refund), in its own currency; null when
                            `amount_error` is set.
                        balance:
                          anyOf:
                            - type: object
                              properties:
                                amount:
                                  type: string
                                  description: >-
                                    A decimal string with the currency's
                                    decimals; negative for a loss or a negative
                                    balance.
                                currency:
                                  type: string
                                  description: ISO 4217 code.
                              required:
                                - amount
                                - currency
                              additionalProperties: false
                            - type: 'null'
                          description: >-
                            The payment account's balance after the entry, in
                            the entry's own currency: across a currency change
                            the running balance does not carry over. Null when
                            `amount_error` is set.
                        amount_error:
                          anyOf:
                            - type: string
                              enum:
                                - currency_unknown
                            - type: 'null'
                          description: >-
                            `currency_unknown`: Alura has not verified how Etsy
                            counts this currency in the ledger, so `amount` and
                            `balance` are null, never a guess.
                      required:
                        - object
                        - id
                        - shop_id
                        - ledger_id
                        - sequence_number
                        - created_at
                        - type
                        - reference_type
                        - reference_id
                        - order_id
                        - order_link
                        - transaction_id
                        - listing_id
                        - currency
                        - amount
                        - balance
                        - amount_error
                      additionalProperties: false
                  has_more:
                    type: boolean
                  next_cursor:
                    type:
                      - string
                      - 'null'
                  total:
                    type: object
                    properties:
                      value:
                        type: integer
                      relation:
                        type: string
                        enum:
                          - eq
                          - gte
                    required:
                      - value
                      - relation
                    additionalProperties: false
                  summary:
                    type: object
                    properties:
                      as_of:
                        anyOf:
                          - type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                          - type: 'null'
                        description: >-
                          The oldest included shop's data time; null when a
                          shop's is unknown.
                      freshness:
                        type: array
                        items:
                          type: object
                          properties:
                            shop_id:
                              type: string
                            as_of:
                              anyOf:
                                - type: string
                                  format: date-time
                                  pattern: >-
                                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                                - type: 'null'
                          required:
                            - shop_id
                            - as_of
                          additionalProperties: false
                        description: Each included shop's data time.
                      notices:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                              description: >-
                                `stale_shops`, `sales_not_covered`,
                                `partial_range`, `settings_not_fetched`,
                                `holiday_settings_not_offered`,
                                `settings_sections_only`,
                                `listings_count_unavailable`,
                                `listings_not_synced`, `shipping_cost_inexact`,
                                `sales_through`, `refunds_partial`,
                                `unknown_sales_inputs`,
                                `sync_daily_cap_reached`,
                                `currency_converted_at_current_rate`,
                                `reviews_not_synced`, `reviews_stale`,
                                `customers_not_computed`, `history_pending`,
                                `lifetime_value_ranked_by_stored_total`,
                                `refunds_unknown`, `lifetime_value_unknown`,
                                `items_unknown`, `search_incomplete`,
                                `no_ads_campaign`, `ledger_gap`,
                                `ledger_history_pending` or
                                `ledger_unsequenced`. New codes may be added.
                            shop_ids:
                              type: array
                              items:
                                type: string
                              description: The shops the notice is about.
                            detail:
                              type: string
                          required:
                            - code
                            - shop_ids
                            - detail
                          additionalProperties: false
                      not_stored:
                        anyOf:
                          - type: object
                            properties:
                              from:
                                type: integer
                                description: >-
                                  The first sequence number Alura has not
                                  stored.
                              to:
                                type: integer
                                description: The last sequence number Alura has not stored.
                              after:
                                type: integer
                                description: >-
                                  The `after` that reads on past the range (the
                                  page stopped before it).
                            required:
                              - from
                              - to
                              - after
                            additionalProperties: false
                            description: >-
                              The sequence numbers this page stopped at
                              (`ledger_gap` or `ledger_history_pending`): read
                              again later from the same `after`; send this
                              `after` only to skip them on purpose. Null when
                              the page did not stop at one.
                          - type: 'null'
                    required:
                      - as_of
                      - freshness
                      - notices
                      - not_stored
                    additionalProperties: false
                  limit_applied:
                    description: >-
                      Present only when `limit` asked for more than 1000: the
                      page size used instead, 1000.
                    type: integer
                required:
                  - object
                  - data
                  - has_more
                  - next_cursor
                  - total
                  - summary
                additionalProperties: false
              example:
                object: list
                data:
                  - object: ledger_entry
                    id: '1950000001'
                    shop_id: '22841907'
                    ledger_id: '1950000100'
                    sequence_number: 1
                    created_at: '2026-10-15T10:10:26.000Z'
                    type: PAYMENT_PROCESSING_FEE
                    reference_type: processing_fee
                    reference_id: '1950000200'
                    order_id: '3456789012'
                    order_link: order
                    transaction_id: null
                    listing_id: null
                    currency: USD
                    amount:
                      amount: '-1.24'
                      currency: USD
                    balance:
                      amount: '-1.24'
                      currency: USD
                    amount_error: null
                  - object: ledger_entry
                    id: '1950000002'
                    shop_id: '22841907'
                    ledger_id: '1950000100'
                    sequence_number: 2
                    created_at: '2026-10-15T10:10:27.000Z'
                    type: PAYMENT_GROSS
                    reference_type: shop_payment
                    reference_id: '1950000200'
                    order_id: '3456789012'
                    order_link: order
                    transaction_id: null
                    listing_id: null
                    currency: USD
                    amount:
                      amount: '32.50'
                      currency: USD
                    balance:
                      amount: '31.26'
                      currency: USD
                    amount_error: null
                  - object: ledger_entry
                    id: '1950000003'
                    shop_id: '22841907'
                    ledger_id: '1950000100'
                    sequence_number: 3
                    created_at: '2026-10-15T10:10:28.000Z'
                    type: sales_tax
                    reference_type: receipt
                    reference_id: '3456789012'
                    order_id: '3456789012'
                    order_link: order
                    transaction_id: null
                    listing_id: null
                    currency: USD
                    amount:
                      amount: '-2.60'
                      currency: USD
                    balance:
                      amount: '28.66'
                      currency: USD
                    amount_error: null
                  - object: ledger_entry
                    id: '1950000004'
                    shop_id: '22841907'
                    ledger_id: '1950000100'
                    sequence_number: 4
                    created_at: '2026-10-15T10:10:29.000Z'
                    type: transaction
                    reference_type: transaction
                    reference_id: '1950000300'
                    order_id: '3456789012'
                    order_link: order
                    transaction_id: '1950000300'
                    listing_id: null
                    currency: USD
                    amount:
                      amount: '-1.95'
                      currency: USD
                    balance:
                      amount: '26.71'
                      currency: USD
                    amount_error: null
                  - object: ledger_entry
                    id: '1950000005'
                    shop_id: '22841907'
                    ledger_id: '1950000100'
                    sequence_number: 5
                    created_at: '2026-10-15T10:10:30.000Z'
                    type: offsite_ads_fee
                    reference_type: receipt
                    reference_id: '3456789012'
                    order_id: '3456789012'
                    order_link: order
                    transaction_id: null
                    listing_id: null
                    currency: USD
                    amount:
                      amount: '-4.88'
                      currency: USD
                    balance:
                      amount: '21.83'
                      currency: USD
                    amount_error: null
                  - object: ledger_entry
                    id: '1950000006'
                    shop_id: '22841907'
                    ledger_id: '1950000100'
                    sequence_number: 6
                    created_at: '2026-10-15T10:10:31.000Z'
                    type: listing
                    reference_type: listing
                    reference_id: '1834720561'
                    order_id: null
                    order_link: listing
                    transaction_id: null
                    listing_id: '1834720561'
                    currency: USD
                    amount:
                      amount: '-0.20'
                      currency: USD
                    balance:
                      amount: '21.63'
                      currency: USD
                    amount_error: null
                  - object: ledger_entry
                    id: '1950000007'
                    shop_id: '22841907'
                    ledger_id: '1950000100'
                    sequence_number: 7
                    created_at: '2026-10-15T10:10:32.000Z'
                    type: prolist
                    reference_type: prolist
                    reference_id: '1950000400'
                    order_id: null
                    order_link: none
                    transaction_id: null
                    listing_id: null
                    currency: USD
                    amount:
                      amount: '-1.00'
                      currency: USD
                    balance:
                      amount: '20.63'
                      currency: USD
                    amount_error: null
                has_more: false
                next_cursor: null
                total:
                  value: 7
                  relation: gte
                summary:
                  as_of: '2026-10-08T06:00:00.000Z'
                  freshness:
                    - shop_id: '22841907'
                      as_of: '2026-10-08T06:00:00.000Z'
                  notices:
                    - code: stale_shops
                      shop_ids:
                        - '22841907'
                      detail: >-
                        These shops have no data, or no data newer than 7 days,
                        for this area. Start a sync to refresh them.
                  not_stored: null
        '400':
          $ref: '#/components/responses/Problem400'
        '401':
          $ref: '#/components/responses/Problem401'
        '402':
          $ref: '#/components/responses/Problem402'
        '403':
          $ref: '#/components/responses/Problem403'
        '404':
          $ref: '#/components/responses/Problem404'
        '405':
          $ref: '#/components/responses/Problem405'
        '429':
          $ref: '#/components/responses/Problem429'
        '500':
          $ref: '#/components/responses/Problem500'
        '503':
          $ref: '#/components/responses/Problem503'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl "https://api.alura.io/v1/workspace/ledger?shop_id=22841907" \
              -H "Authorization: Bearer $ALURA_API_KEY"
        - lang: typescript
          label: TypeScript
          source: >-
            const res = await
            fetch('https://api.alura.io/v1/workspace/ledger?shop_id=22841907', {
              headers: {
                Authorization: `Bearer ${process.env.ALURA_API_KEY}`,
              },
            });

            console.log(await res.json());
        - lang: python
          label: Python
          source: |-
            import json
            import os
            import urllib.request

            request = urllib.request.Request(
                "https://api.alura.io/v1/workspace/ledger?shop_id=22841907",
                headers={
                    "Authorization": f"Bearer {os.environ['ALURA_API_KEY']}",
                },
            )
            with urllib.request.urlopen(request) as response:
                print(json.load(response))
components:
  headers:
    Request-Id:
      description: '`req_` + ULID; quote it when reporting a problem.'
      schema:
        type: string
    Alura-Credits-Cost:
      description: API credits this call cost.
      schema:
        type: integer
    Alura-Credits-Remaining:
      description: >-
        API credits left in the workspace's monthly allowance, counting calls
        still in flight. Absent when it cannot be read right now.
      schema:
        type: integer
  responses:
    Problem400:
      description: Error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: https://docs.alura.io/errors/invalid_request
            title: Invalid request
            status: 400
            code: invalid_request
            detail: Invalid request
            suggestion: Fix the request as the detail says, then send it again.
            retryable: false
            request_id: req_01JQ5W3H8M2N4P6R8T0V2X4Z6B
    Problem401:
      description: Error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: https://docs.alura.io/errors/unauthorized
            title: Unauthorized
            status: 401
            code: unauthorized
            detail: Unauthorized
            suggestion: 'Send a valid API key as `Authorization: Bearer alura_sk_...`.'
            retryable: false
            request_id: req_01JQ5W3H8M2N4P6R8T0V2X4Z6B
    Problem402:
      description: Error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: https://docs.alura.io/errors/credits_exhausted
            title: API credits exhausted
            status: 402
            code: credits_exhausted
            detail: API credits exhausted
            suggestion: Upgrade the plan or wait for the monthly reset.
            retryable: false
            request_id: req_01JQ5W3H8M2N4P6R8T0V2X4Z6B
    Problem403:
      description: Error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: https://docs.alura.io/errors/plan_required
            title: Plan required
            status: 403
            code: plan_required
            detail: Plan required
            suggestion: Upgrade the workspace plan to use this operation.
            retryable: false
            request_id: req_01JQ5W3H8M2N4P6R8T0V2X4Z6B
    Problem404:
      description: Error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: https://docs.alura.io/errors/not_found
            title: Not found
            status: 404
            code: not_found
            detail: Not found
            suggestion: Check the ID, or search for it first.
            retryable: false
            request_id: req_01JQ5W3H8M2N4P6R8T0V2X4Z6B
    Problem405:
      description: Error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: https://docs.alura.io/errors/method_not_allowed
            title: Method not allowed
            status: 405
            code: method_not_allowed
            detail: Method not allowed
            suggestion: Use one of the methods in the Allow header.
            retryable: false
            request_id: req_01JQ5W3H8M2N4P6R8T0V2X4Z6B
    Problem429:
      description: Error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: https://docs.alura.io/errors/rate_limited
            title: Rate limited
            status: 429
            code: rate_limited
            detail: Rate limited
            suggestion: Wait for Retry-After, then retry.
            retryable: true
            request_id: req_01JQ5W3H8M2N4P6R8T0V2X4Z6B
    Problem500:
      description: Error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: https://docs.alura.io/errors/internal_error
            title: Internal error
            status: 500
            code: internal_error
            detail: Internal error
            suggestion: Retry; if it keeps failing, report the request_id.
            retryable: true
            request_id: req_01JQ5W3H8M2N4P6R8T0V2X4Z6B
    Problem503:
      description: Error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: https://docs.alura.io/errors/base_unverifiable
            title: Base not verifiable
            status: 503
            code: base_unverifiable
            detail: Base not verifiable
            suggestion: >-
              Alura could not read from Etsy the text or inventory this write
              names a version of, so it could not check it, and nothing was
              written. Retry after Retry-After.
            retryable: true
            request_id: req_01JQ5W3H8M2N4P6R8T0V2X4Z6B
  schemas:
    Problem:
      type: object
      description: RFC 9457 problem details.
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        code:
          type: string
          description: A code from the error catalog; new codes may be added.
          x-extensible-enum:
            - invalid_request
            - unknown_parameter
            - invalid_cursor
            - cursor_window_exceeded
            - invalid_reference
            - id_type_mismatch
            - invalid_keyword
            - shop_id_required
            - listing_not_publishable
            - sales_window_not_covered
            - range_too_long_for_interval
            - target_not_available
            - unauthorized
            - credits_exhausted
            - plan_required
            - insufficient_scope
            - workspace_required
            - workspace_locked
            - your_shop_unavailable
            - writes_suspended
            - browser_refused
            - live_data_not_enabled
            - send_not_enabled
            - attachments_not_enabled
            - self_approval
            - role_required
            - impersonation_refused
            - recent_sign_in_required
            - etsy_scope_required
            - etsy_partner_required
            - not_found
            - not_collected
            - not_found_on_etsy
            - shop_opted_out
            - method_not_allowed
            - conflict
            - settings_conflict
            - settings_unreadable
            - optimize_settings_required
            - optimize_plan_changed
            - optimize_run_applied
            - optimize_run_applying
            - optimize_run_too_large
            - optimize_nothing_to_apply
            - optimize_nothing_to_revert
            - optimize_shop_busy
            - runs_unreadable
            - run_not_resumable
            - suggestion_not_pending
            - draft_sent
            - draft_dismissed
            - draft_sending
            - conversation_changed
            - key_limit_reached
            - etsy_not_logged_in
            - etsy_shop_mismatch
            - holder_offline
            - login_expired
            - never_connected
            - etsy_refused
            - extension_update_required
            - attachment_used
            - attachment_expired
            - attachment_unavailable
            - saved_shops_off
            - review_already_replied
            - insights_search_unavailable
            - reconnect_required
            - settings_not_fetched
            - listing_busy
            - settings_busy
            - shop_create_busy
            - idempotency_partial_unverifiable
            - listing_has_variations
            - listing_sold_out
            - changed_since
            - change_not_revertable
            - media_changed
            - text_changed
            - inventory_changed
            - base_unverifiable
            - listing_in_ab_test
            - activation_skipped
            - idempotency_processing
            - confirmation_required
            - test_shop_active_cap
            - write_outcome_unknown
            - margin_required
            - unprocessable
            - knowledge_limit_reached
            - status_required
            - listing_removed_on_etsy
            - optimize_run_expired
            - endpoint_removed
            - rate_limited
            - throttled
            - daily_credit_cap_exceeded
            - credits_reserved
            - fetch_limit_reached
            - write_rate_limited
            - sync_cooldown
            - shop_write_budget_exhausted
            - live_rate_limited
            - etsy_rate_limited
            - internal_error
            - write_misconfigured
            - etsy_changed
            - upstream_unavailable
            - extension_offline
            - etsy_unavailable
            - etsy_challenge
            - live_data_paused
            - live_data_unavailable
            - credits_unavailable
            - service_unavailable
            - fetch_unavailable
            - create_lock_unavailable
            - writes_paused
            - etsy_capacity
            - upstream_timeout
        detail:
          type: string
        suggestion:
          type: string
        retryable:
          type: boolean
        request_id:
          type: string
        upgrade_url:
          type: string
          format: uri
          description: 'credits_exhausted and plan_required: where to upgrade the plan.'
        credits_needed:
          type: integer
          description: 'API credit refusals: what the call needed.'
        credits_remaining:
          type: integer
          description: >-
            API credit refusals: what is left (of the month, or of the day for
            daily_credit_cap_exceeded).
        resets_at:
          type: string
          format: date-time
          description: >-
            credits_exhausted and daily_credit_cap_exceeded: when the limit
            resets.
      required:
        - type
        - title
        - status
        - code
        - detail
        - suggestion
        - retryable
        - request_id
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: 'An API key: `Authorization: Bearer alura_sk_...`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.