{
  "openapi": "3.1.0",
  "info": {
    "title": "resell.store API",
    "version": "1",
    "description": "Everything you can do in resell.store, your code can do too. Docs: https://docs.resell.store/api"
  },
  "servers": [
    {
      "url": "https://api.resell.store/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Your secret key (rs_live_…) or agent link token."
      }
    }
  },
  "paths": {
    "/me": {
      "get": {
        "operationId": "get_me",
        "summary": "Who this key belongs to",
        "description": "The person behind the key, what the key may do, their shops and how many requests they've made this month. A good first call to check a key works.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "account",
                  "id": "usr_7Qm2",
                  "name": "Maya Rivera",
                  "email": "maya@example.com",
                  "key": {
                    "kind": "api",
                    "scopes": [
                      "read",
                      "shops",
                      "listings",
                      "messages",
                      "offers",
                      "orders",
                      "buying",
                      "webhooks"
                    ],
                    "ask_first": [],
                    "max_offer": null
                  },
                  "shops": [
                    {
                      "object": "shop",
                      "slug": "maya",
                      "name": "Maya's closet",
                      "url": "https://maya.resell.store"
                    }
                  ],
                  "usage": {
                    "requests": 1240,
                    "limit": 10000
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/inbox": {
      "get": {
        "operationId": "get_inbox",
        "summary": "What needs you",
        "description": "Everything waiting on you right now, across all your shops: offers to answer, sales to ship and unread messages from buyers, plus counters waiting on you as a buyer. The same list as the badge in the app.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "inbox",
                  "offers_to_answer": [
                    {
                      "object": "offer",
                      "id": "off_1",
                      "status": "open",
                      "amount": 150,
                      "listing": {
                        "title": "Yellow dutch oven, 5.5 qt"
                      }
                    }
                  ],
                  "sales_to_ship": [],
                  "unread_threads": 2,
                  "counters_to_answer": [],
                  "unread_as_buyer": 0
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/shops": {
      "get": {
        "operationId": "get_shops",
        "summary": "List your shops",
        "description": "Every shop you own, oldest first, with how many listings are live, drafts and sold.",
        "tags": [
          "Shops"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "shop",
                      "id": "c0a8…",
                      "slug": "maya",
                      "name": "Maya's closet",
                      "about": "Clothes and kitchen things I don't use any more.",
                      "category": "Clothes",
                      "location": "Portland, OR",
                      "tone": "lemon",
                      "visibility": "public",
                      "paused": false,
                      "url": "https://maya.resell.store",
                      "picture_url": null,
                      "agent": {
                        "answer_questions": true,
                        "haggle": true,
                        "lowest_percent": 15,
                        "ask_hold": true
                      },
                      "counts": {
                        "live": 12,
                        "drafts": 2,
                        "sold": 20
                      },
                      "created_at": "2026-09-03T17:20:00.000Z"
                    }
                  ],
                  "total": 1,
                  "has_more": false
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post_shops",
        "summary": "Open a shop",
        "description": "Opens a new shop at {slug}.resell.store. Slugs are unique across resell.store.",
        "tags": [
          "Shops"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "shops",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32,
                    "description": "The subdomain, e.g. \"maya\" for maya.resell.store."
                  },
                  "category": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "about": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "tone": {
                    "default": "lemon",
                    "type": "string",
                    "enum": [
                      "lemon",
                      "mint",
                      "pink",
                      "leaf",
                      "blush"
                    ]
                  },
                  "visibility": {
                    "default": "public",
                    "type": "string",
                    "enum": [
                      "public",
                      "link",
                      "private"
                    ]
                  }
                },
                "required": [
                  "name",
                  "slug"
                ]
              },
              "example": {
                "name": "Maya's kitchen",
                "slug": "maya-kitchen",
                "category": "Home",
                "visibility": "public"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32,
                    "description": "The subdomain, e.g. \"maya\" for maya.resell.store."
                  },
                  "category": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "about": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "tone": {
                    "default": "lemon",
                    "type": "string",
                    "enum": [
                      "lemon",
                      "mint",
                      "pink",
                      "leaf",
                      "blush"
                    ]
                  },
                  "visibility": {
                    "default": "public",
                    "type": "string",
                    "enum": [
                      "public",
                      "link",
                      "private"
                    ]
                  }
                },
                "required": [
                  "name",
                  "slug"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "shop",
                  "id": "c0a8…",
                  "slug": "maya-kitchen",
                  "name": "Maya's kitchen",
                  "about": "Clothes and kitchen things I don't use any more.",
                  "category": "Clothes",
                  "location": "Portland, OR",
                  "tone": "lemon",
                  "visibility": "public",
                  "paused": false,
                  "url": "https://maya-kitchen.resell.store",
                  "picture_url": null,
                  "agent": {
                    "answer_questions": true,
                    "haggle": true,
                    "lowest_percent": 15,
                    "ask_hold": true
                  },
                  "counts": {
                    "live": 12,
                    "drafts": 2,
                    "sold": 20
                  },
                  "created_at": "2026-09-03T17:20:00.000Z"
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/shops/{slug}": {
      "get": {
        "operationId": "get_shops_slug",
        "summary": "Get a shop",
        "description": "One of your shops by its slug, with this week's numbers.",
        "tags": [
          "Shops"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "shop",
                  "id": "c0a8…",
                  "slug": "maya",
                  "name": "Maya's closet",
                  "about": "Clothes and kitchen things I don't use any more.",
                  "category": "Clothes",
                  "location": "Portland, OR",
                  "tone": "lemon",
                  "visibility": "public",
                  "paused": false,
                  "url": "https://maya.resell.store",
                  "picture_url": null,
                  "agent": {
                    "answer_questions": true,
                    "haggle": true,
                    "lowest_percent": 15,
                    "ask_hold": true
                  },
                  "counts": {
                    "live": 12,
                    "drafts": 2,
                    "sold": 20
                  },
                  "created_at": "2026-09-03T17:20:00.000Z",
                  "stats": {
                    "views": 1606,
                    "views_7d": 214,
                    "followers": 105,
                    "likes": 48,
                    "shares": 9,
                    "offers_waiting": 2
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patch_shops_slug",
        "summary": "Change a shop",
        "description": "Change any of the shop's settings. Send only what changes. A new `slug` moves the store to a new address.",
        "tags": [
          "Shops"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "shops",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "name": {
                    "description": "Shown at the top of the store.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "slug": {
                    "description": "The subdomain: {slug}.resell.store. Changing it moves the store.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32
                  },
                  "about": {
                    "description": "A line or two about the shop.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 300
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "category": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "location": {
                    "description": "Where things ship from, e.g. \"Portland, OR\".",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 80
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tone": {
                    "description": "The shop's colour.",
                    "type": "string",
                    "enum": [
                      "lemon",
                      "mint",
                      "pink",
                      "leaf",
                      "blush"
                    ]
                  },
                  "visibility": {
                    "description": "public: listed on the marketplace. link: only people with the link. private: only you.",
                    "type": "string",
                    "enum": [
                      "public",
                      "link",
                      "private"
                    ]
                  },
                  "paused": {
                    "description": "Hides the shop and keeps everything.",
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1",
                          "true",
                          "false",
                          "yes",
                          "no",
                          "on",
                          "off"
                        ]
                      }
                    ]
                  },
                  "answer_questions": {
                    "description": "Let the shop's agent answer buyers' questions.",
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1",
                          "true",
                          "false",
                          "yes",
                          "no",
                          "on",
                          "off"
                        ]
                      }
                    ]
                  },
                  "haggle": {
                    "description": "Let the shop's agent haggle on offers.",
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1",
                          "true",
                          "false",
                          "yes",
                          "no",
                          "on",
                          "off"
                        ]
                      }
                    ]
                  },
                  "lowest_percent": {
                    "description": "Lowest the agent will go, as % off the price.",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 90
                  },
                  "ask_hold": {
                    "description": "Ask for a deposit to hold an item.",
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1",
                          "true",
                          "false",
                          "yes",
                          "no",
                          "on",
                          "off"
                        ]
                      }
                    ]
                  }
                }
              },
              "example": {
                "about": "Clothes, shoes and a few kitchen things.",
                "haggle": true,
                "lowest_percent": 20
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "name": {
                    "description": "Shown at the top of the store.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "slug": {
                    "description": "The subdomain: {slug}.resell.store. Changing it moves the store.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32
                  },
                  "about": {
                    "description": "A line or two about the shop.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 300
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "category": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "location": {
                    "description": "Where things ship from, e.g. \"Portland, OR\".",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 80
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tone": {
                    "description": "The shop's colour.",
                    "type": "string",
                    "enum": [
                      "lemon",
                      "mint",
                      "pink",
                      "leaf",
                      "blush"
                    ]
                  },
                  "visibility": {
                    "description": "public: listed on the marketplace. link: only people with the link. private: only you.",
                    "type": "string",
                    "enum": [
                      "public",
                      "link",
                      "private"
                    ]
                  },
                  "paused": {
                    "description": "Hides the shop and keeps everything.",
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1",
                          "true",
                          "false",
                          "yes",
                          "no",
                          "on",
                          "off"
                        ]
                      }
                    ]
                  },
                  "answer_questions": {
                    "description": "Let the shop's agent answer buyers' questions.",
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1",
                          "true",
                          "false",
                          "yes",
                          "no",
                          "on",
                          "off"
                        ]
                      }
                    ]
                  },
                  "haggle": {
                    "description": "Let the shop's agent haggle on offers.",
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1",
                          "true",
                          "false",
                          "yes",
                          "no",
                          "on",
                          "off"
                        ]
                      }
                    ]
                  },
                  "lowest_percent": {
                    "description": "Lowest the agent will go, as % off the price.",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 90
                  },
                  "ask_hold": {
                    "description": "Ask for a deposit to hold an item.",
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1",
                          "true",
                          "false",
                          "yes",
                          "no",
                          "on",
                          "off"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "shop",
                  "id": "c0a8…",
                  "slug": "maya",
                  "name": "Maya's closet",
                  "about": "Clothes and kitchen things I don't use any more.",
                  "category": "Clothes",
                  "location": "Portland, OR",
                  "tone": "lemon",
                  "visibility": "public",
                  "paused": false,
                  "url": "https://maya.resell.store",
                  "picture_url": null,
                  "agent": {
                    "answer_questions": true,
                    "haggle": true,
                    "lowest_percent": 15,
                    "ask_hold": true
                  },
                  "counts": {
                    "live": 12,
                    "drafts": 2,
                    "sold": 20
                  },
                  "created_at": "2026-09-03T17:20:00.000Z"
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_shops_slug",
        "summary": "Delete a shop",
        "description": "Deletes the shop, its listings and their photos. This can't be undone. A shop with sales can't be deleted (the orders keep a record of it); pause it instead.",
        "tags": [
          "Shops"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "shops",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "shop",
                  "slug": "maya-kitchen",
                  "deleted": true
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/listings": {
      "get": {
        "operationId": "get_listings",
        "summary": "List your listings",
        "description": "Listings across your shops, most recently changed first. Filter by shop or status.",
        "tags": [
          "Listings"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "shop",
            "in": "query",
            "required": false,
            "schema": {
              "description": "A shop slug. Leave out for every shop.",
              "type": "string"
            },
            "description": "A shop slug. Leave out for every shop."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "live",
                "sold"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "description": "How many to return, 1 to 100. Default 25.",
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "How many to return, 1 to 100. Default 25."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "description": "How many to skip, for the next page.",
              "type": "integer",
              "minimum": 0,
              "maximum": 100000
            },
            "description": "How many to skip, for the next page."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "listing",
                      "id": "8d1e6c2a-…",
                      "shop": "maya",
                      "status": "live",
                      "visibility": "everyone",
                      "step": "publish",
                      "name": "Le Creuset dutch oven",
                      "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                      "one_liner": "The good one, barely used, ready for soup season",
                      "description": "Bought it for a recipe I made twice. No chips…",
                      "category": "Kitchen",
                      "price": 185,
                      "lowest_price": 160,
                      "shipping": 18,
                      "take_offers": true,
                      "fields": [
                        {
                          "key": "brand",
                          "label": "Brand",
                          "value": "Le Creuset",
                          "source": "agent"
                        },
                        {
                          "key": "condition",
                          "label": "Condition",
                          "value": "Like new",
                          "source": "you"
                        }
                      ],
                      "photos": [
                        {
                          "id": "3f…",
                          "url": "https://files.resell.store/…",
                          "alt": null,
                          "source": null,
                          "is_video": false
                        }
                      ],
                      "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt",
                      "edit_url": "https://resell.store/listings/8d1e6c2a-…",
                      "stats": {
                        "views": 214,
                        "views_7d": 61,
                        "likes": 12,
                        "shares": 3,
                        "offers": 2,
                        "offers_waiting": 1
                      },
                      "research": {
                        "identified": "Le Creuset Signature round dutch oven, 5.5 qt, Soleil",
                        "category": "Kitchen",
                        "confidence": "high",
                        "suggested_price": 185,
                        "price_range": {
                          "low": 160,
                          "high": 210
                        },
                        "summary": "Sells quickly between $160 and $210 in this colour."
                      },
                      "published_at": "2026-09-28T16:02:11.000Z",
                      "sold_at": null,
                      "created_at": "2026-09-28T15:40:00.000Z",
                      "updated_at": "2026-09-28T16:02:11.000Z"
                    }
                  ],
                  "total": 12,
                  "has_more": true
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post_listings",
        "summary": "Make a listing",
        "description": "Makes a draft in one of your shops. Give it what you know: a `prompt` (\"yellow le creuset dutch oven, 5.5 qt, used twice\") is enough for the research agent to work out the rest; or set the title, price and details yourself. Add `research: true` to look it up and suggest a price (poll GET /listings/:id/research). Add `publish: true` to put it live straight away, if it has a title and a price.",
        "tags": [
          "Listings"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "listings",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "shop": {
                    "description": "A shop slug. Defaults to your first shop.",
                    "type": "string"
                  },
                  "prompt": {
                    "description": "What it is, in your words. The research agent starts from this.",
                    "type": "string",
                    "maxLength": 500
                  },
                  "title": {
                    "description": "Up to 80 characters. What it is first: brand, item, key detail.",
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "one_liner": {
                    "description": "One line under the title, up to 120 characters.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 5000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "category": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 60
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "price": {
                    "description": "The asking price in dollars.",
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lowest_price": {
                    "description": "The private floor the shop's agent won't go under. Never shown to buyers.",
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "shipping": {
                    "description": "Shipping in dollars. 0 means pickup only.",
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "take_offers": {
                    "description": "Whether buyers can make offers. Default true.",
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1",
                          "true",
                          "false",
                          "yes",
                          "no",
                          "on",
                          "off"
                        ]
                      }
                    ]
                  },
                  "visibility": {
                    "description": "everyone: in search and on the store. link: only people with the link.",
                    "type": "string",
                    "enum": [
                      "everyone",
                      "link"
                    ]
                  },
                  "fields": {
                    "description": "Details like brand, size and condition, as { \"Label\": \"value\" }. Merged into what's there.",
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "label",
                            "value"
                          ]
                        }
                      }
                    ]
                  },
                  "photo_urls": {
                    "description": "Public picture URLs. We download and keep a copy of each.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "string"
                      }
                    ]
                  },
                  "research": {
                    "description": "Look it up and suggest a price, in the background.",
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1",
                          "true",
                          "false",
                          "yes",
                          "no",
                          "on",
                          "off"
                        ]
                      }
                    ]
                  },
                  "publish": {
                    "description": "Put it live now. Needs a title and a price.",
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1",
                          "true",
                          "false",
                          "yes",
                          "no",
                          "on",
                          "off"
                        ]
                      }
                    ]
                  }
                }
              },
              "example": {
                "shop": "maya",
                "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                "price": 185,
                "lowest_price": 160,
                "fields": {
                  "Brand": "Le Creuset",
                  "Condition": "Like new"
                },
                "publish": true
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "shop": {
                    "description": "A shop slug. Defaults to your first shop.",
                    "type": "string"
                  },
                  "prompt": {
                    "description": "What it is, in your words. The research agent starts from this.",
                    "type": "string",
                    "maxLength": 500
                  },
                  "title": {
                    "description": "Up to 80 characters. What it is first: brand, item, key detail.",
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "one_liner": {
                    "description": "One line under the title, up to 120 characters.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 5000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "category": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 60
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "price": {
                    "description": "The asking price in dollars.",
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lowest_price": {
                    "description": "The private floor the shop's agent won't go under. Never shown to buyers.",
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "shipping": {
                    "description": "Shipping in dollars. 0 means pickup only.",
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "take_offers": {
                    "description": "Whether buyers can make offers. Default true.",
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1",
                          "true",
                          "false",
                          "yes",
                          "no",
                          "on",
                          "off"
                        ]
                      }
                    ]
                  },
                  "visibility": {
                    "description": "everyone: in search and on the store. link: only people with the link.",
                    "type": "string",
                    "enum": [
                      "everyone",
                      "link"
                    ]
                  },
                  "fields": {
                    "description": "Details like brand, size and condition, as { \"Label\": \"value\" }. Merged into what's there.",
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "label",
                            "value"
                          ]
                        }
                      }
                    ]
                  },
                  "photo_urls": {
                    "description": "Public picture URLs. We download and keep a copy of each.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "string"
                      }
                    ]
                  },
                  "research": {
                    "description": "Look it up and suggest a price, in the background.",
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1",
                          "true",
                          "false",
                          "yes",
                          "no",
                          "on",
                          "off"
                        ]
                      }
                    ]
                  },
                  "publish": {
                    "description": "Put it live now. Needs a title and a price.",
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1",
                          "true",
                          "false",
                          "yes",
                          "no",
                          "on",
                          "off"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "listing",
                  "id": "8d1e6c2a-…",
                  "shop": "maya",
                  "status": "live",
                  "visibility": "everyone",
                  "step": "publish",
                  "name": "Le Creuset dutch oven",
                  "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                  "one_liner": "The good one, barely used, ready for soup season",
                  "description": "Bought it for a recipe I made twice. No chips…",
                  "category": "Kitchen",
                  "price": 185,
                  "lowest_price": 160,
                  "shipping": 18,
                  "take_offers": true,
                  "fields": [
                    {
                      "key": "brand",
                      "label": "Brand",
                      "value": "Le Creuset",
                      "source": "agent"
                    },
                    {
                      "key": "condition",
                      "label": "Condition",
                      "value": "Like new",
                      "source": "you"
                    }
                  ],
                  "photos": [
                    {
                      "id": "3f…",
                      "url": "https://files.resell.store/…",
                      "alt": null,
                      "source": null,
                      "is_video": false
                    }
                  ],
                  "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt",
                  "edit_url": "https://resell.store/listings/8d1e6c2a-…",
                  "stats": {
                    "views": 214,
                    "views_7d": 61,
                    "likes": 12,
                    "shares": 3,
                    "offers": 2,
                    "offers_waiting": 1
                  },
                  "research": {
                    "identified": "Le Creuset Signature round dutch oven, 5.5 qt, Soleil",
                    "category": "Kitchen",
                    "confidence": "high",
                    "suggested_price": 185,
                    "price_range": {
                      "low": 160,
                      "high": 210
                    },
                    "summary": "Sells quickly between $160 and $210 in this colour."
                  },
                  "published_at": "2026-09-28T16:02:11.000Z",
                  "sold_at": null,
                  "created_at": "2026-09-28T15:40:00.000Z",
                  "updated_at": "2026-09-28T16:02:11.000Z"
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/listings/{id}": {
      "get": {
        "operationId": "get_listings_id",
        "summary": "Get a listing",
        "description": "Everything about one of your listings: its words, details, photos, research and numbers.",
        "tags": [
          "Listings"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "listing",
                  "id": "8d1e6c2a-…",
                  "shop": "maya",
                  "status": "live",
                  "visibility": "everyone",
                  "step": "publish",
                  "name": "Le Creuset dutch oven",
                  "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                  "one_liner": "The good one, barely used, ready for soup season",
                  "description": "Bought it for a recipe I made twice. No chips…",
                  "category": "Kitchen",
                  "price": 185,
                  "lowest_price": 160,
                  "shipping": 18,
                  "take_offers": true,
                  "fields": [
                    {
                      "key": "brand",
                      "label": "Brand",
                      "value": "Le Creuset",
                      "source": "agent"
                    },
                    {
                      "key": "condition",
                      "label": "Condition",
                      "value": "Like new",
                      "source": "you"
                    }
                  ],
                  "photos": [
                    {
                      "id": "3f…",
                      "url": "https://files.resell.store/…",
                      "alt": null,
                      "source": null,
                      "is_video": false
                    }
                  ],
                  "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt",
                  "edit_url": "https://resell.store/listings/8d1e6c2a-…",
                  "stats": {
                    "views": 214,
                    "views_7d": 61,
                    "likes": 12,
                    "shares": 3,
                    "offers": 2,
                    "offers_waiting": 1
                  },
                  "research": {
                    "identified": "Le Creuset Signature round dutch oven, 5.5 qt, Soleil",
                    "category": "Kitchen",
                    "confidence": "high",
                    "suggested_price": 185,
                    "price_range": {
                      "low": 160,
                      "high": 210
                    },
                    "summary": "Sells quickly between $160 and $210 in this colour."
                  },
                  "published_at": "2026-09-28T16:02:11.000Z",
                  "sold_at": null,
                  "created_at": "2026-09-28T15:40:00.000Z",
                  "updated_at": "2026-09-28T16:02:11.000Z"
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patch_listings_id",
        "summary": "Change a listing",
        "description": "Change the words, price, details or who can see it. Send only what changes; `null` clears a field. Changes to a live listing show straight away.",
        "tags": [
          "Listings"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "listings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "title": {
                    "description": "Up to 80 characters. What it is first: brand, item, key detail.",
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "one_liner": {
                    "description": "One line under the title, up to 120 characters.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 5000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "category": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 60
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "price": {
                    "description": "The asking price in dollars.",
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lowest_price": {
                    "description": "The private floor the shop's agent won't go under. Never shown to buyers.",
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "shipping": {
                    "description": "Shipping in dollars. 0 means pickup only.",
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "take_offers": {
                    "description": "Whether buyers can make offers. Default true.",
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1",
                          "true",
                          "false",
                          "yes",
                          "no",
                          "on",
                          "off"
                        ]
                      }
                    ]
                  },
                  "visibility": {
                    "description": "everyone: in search and on the store. link: only people with the link.",
                    "type": "string",
                    "enum": [
                      "everyone",
                      "link"
                    ]
                  },
                  "fields": {
                    "description": "Details like brand, size and condition, as { \"Label\": \"value\" }. Merged into what's there.",
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "label",
                            "value"
                          ]
                        }
                      }
                    ]
                  }
                }
              },
              "example": {
                "price": 170,
                "fields": {
                  "Condition": "Very good"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "title": {
                    "description": "Up to 80 characters. What it is first: brand, item, key detail.",
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "one_liner": {
                    "description": "One line under the title, up to 120 characters.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 5000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "category": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 60
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "price": {
                    "description": "The asking price in dollars.",
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lowest_price": {
                    "description": "The private floor the shop's agent won't go under. Never shown to buyers.",
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "shipping": {
                    "description": "Shipping in dollars. 0 means pickup only.",
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "take_offers": {
                    "description": "Whether buyers can make offers. Default true.",
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1",
                          "true",
                          "false",
                          "yes",
                          "no",
                          "on",
                          "off"
                        ]
                      }
                    ]
                  },
                  "visibility": {
                    "description": "everyone: in search and on the store. link: only people with the link.",
                    "type": "string",
                    "enum": [
                      "everyone",
                      "link"
                    ]
                  },
                  "fields": {
                    "description": "Details like brand, size and condition, as { \"Label\": \"value\" }. Merged into what's there.",
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "label",
                            "value"
                          ]
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "listing",
                  "id": "8d1e6c2a-…",
                  "shop": "maya",
                  "status": "live",
                  "visibility": "everyone",
                  "step": "publish",
                  "name": "Le Creuset dutch oven",
                  "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                  "one_liner": "The good one, barely used, ready for soup season",
                  "description": "Bought it for a recipe I made twice. No chips…",
                  "category": "Kitchen",
                  "price": 185,
                  "lowest_price": 160,
                  "shipping": 18,
                  "take_offers": true,
                  "fields": [
                    {
                      "key": "brand",
                      "label": "Brand",
                      "value": "Le Creuset",
                      "source": "agent"
                    },
                    {
                      "key": "condition",
                      "label": "Condition",
                      "value": "Like new",
                      "source": "you"
                    }
                  ],
                  "photos": [
                    {
                      "id": "3f…",
                      "url": "https://files.resell.store/…",
                      "alt": null,
                      "source": null,
                      "is_video": false
                    }
                  ],
                  "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt",
                  "edit_url": "https://resell.store/listings/8d1e6c2a-…",
                  "stats": {
                    "views": 214,
                    "views_7d": 61,
                    "likes": 12,
                    "shares": 3,
                    "offers": 2,
                    "offers_waiting": 1
                  },
                  "research": {
                    "identified": "Le Creuset Signature round dutch oven, 5.5 qt, Soleil",
                    "category": "Kitchen",
                    "confidence": "high",
                    "suggested_price": 185,
                    "price_range": {
                      "low": 160,
                      "high": 210
                    },
                    "summary": "Sells quickly between $160 and $210 in this colour."
                  },
                  "published_at": "2026-09-28T16:02:11.000Z",
                  "sold_at": null,
                  "created_at": "2026-09-28T15:40:00.000Z",
                  "updated_at": "2026-09-28T16:02:11.000Z"
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_listings_id",
        "summary": "Delete a listing",
        "description": "Deletes a listing and its photos. Listings that have sold stay on record and can't be deleted.",
        "tags": [
          "Listings"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "listings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "listing",
                  "id": "8d1e6c2a-…",
                  "deleted": true
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/listings/{id}/publish": {
      "post": {
        "operationId": "post_listings_id_publish",
        "summary": "Put a listing live",
        "description": "Publishes it on your store, at a link made from the title. With `visibility: \"link\"` it stays out of search and the store page. Needs a title and a price.",
        "tags": [
          "Listings"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "listings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "everyone",
                      "link"
                    ]
                  }
                }
              },
              "example": {
                "visibility": "everyone"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "everyone",
                      "link"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "listing",
                  "id": "8d1e6c2a-…",
                  "shop": "maya",
                  "status": "live",
                  "visibility": "everyone",
                  "step": "publish",
                  "name": "Le Creuset dutch oven",
                  "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                  "one_liner": "The good one, barely used, ready for soup season",
                  "description": "Bought it for a recipe I made twice. No chips…",
                  "category": "Kitchen",
                  "price": 185,
                  "lowest_price": 160,
                  "shipping": 18,
                  "take_offers": true,
                  "fields": [
                    {
                      "key": "brand",
                      "label": "Brand",
                      "value": "Le Creuset",
                      "source": "agent"
                    },
                    {
                      "key": "condition",
                      "label": "Condition",
                      "value": "Like new",
                      "source": "you"
                    }
                  ],
                  "photos": [
                    {
                      "id": "3f…",
                      "url": "https://files.resell.store/…",
                      "alt": null,
                      "source": null,
                      "is_video": false
                    }
                  ],
                  "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt",
                  "edit_url": "https://resell.store/listings/8d1e6c2a-…",
                  "stats": {
                    "views": 214,
                    "views_7d": 61,
                    "likes": 12,
                    "shares": 3,
                    "offers": 2,
                    "offers_waiting": 1
                  },
                  "research": {
                    "identified": "Le Creuset Signature round dutch oven, 5.5 qt, Soleil",
                    "category": "Kitchen",
                    "confidence": "high",
                    "suggested_price": 185,
                    "price_range": {
                      "low": 160,
                      "high": 210
                    },
                    "summary": "Sells quickly between $160 and $210 in this colour."
                  },
                  "published_at": "2026-09-28T16:02:11.000Z",
                  "sold_at": null,
                  "created_at": "2026-09-28T15:40:00.000Z",
                  "updated_at": "2026-09-28T16:02:11.000Z"
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/listings/{id}/unpublish": {
      "post": {
        "operationId": "post_listings_id_unpublish",
        "summary": "Take a listing down",
        "description": "Back to a draft. It keeps its link for when it goes back up.",
        "tags": [
          "Listings"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "listings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "listing",
                  "id": "8d1e6c2a-…",
                  "shop": "maya",
                  "status": "draft",
                  "visibility": "everyone",
                  "step": "publish",
                  "name": "Le Creuset dutch oven",
                  "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                  "one_liner": "The good one, barely used, ready for soup season",
                  "description": "Bought it for a recipe I made twice. No chips…",
                  "category": "Kitchen",
                  "price": 185,
                  "lowest_price": 160,
                  "shipping": 18,
                  "take_offers": true,
                  "fields": [
                    {
                      "key": "brand",
                      "label": "Brand",
                      "value": "Le Creuset",
                      "source": "agent"
                    },
                    {
                      "key": "condition",
                      "label": "Condition",
                      "value": "Like new",
                      "source": "you"
                    }
                  ],
                  "photos": [
                    {
                      "id": "3f…",
                      "url": "https://files.resell.store/…",
                      "alt": null,
                      "source": null,
                      "is_video": false
                    }
                  ],
                  "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt",
                  "edit_url": "https://resell.store/listings/8d1e6c2a-…",
                  "stats": {
                    "views": 214,
                    "views_7d": 61,
                    "likes": 12,
                    "shares": 3,
                    "offers": 2,
                    "offers_waiting": 1
                  },
                  "research": {
                    "identified": "Le Creuset Signature round dutch oven, 5.5 qt, Soleil",
                    "category": "Kitchen",
                    "confidence": "high",
                    "suggested_price": 185,
                    "price_range": {
                      "low": 160,
                      "high": 210
                    },
                    "summary": "Sells quickly between $160 and $210 in this colour."
                  },
                  "published_at": null,
                  "sold_at": null,
                  "created_at": "2026-09-28T15:40:00.000Z",
                  "updated_at": "2026-09-28T16:02:11.000Z"
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/listings/{id}/mark-sold": {
      "post": {
        "operationId": "post_listings_id_mark_sold",
        "summary": "Mark sold elsewhere",
        "description": "For something that sold somewhere else. Sales through resell.store mark themselves sold.",
        "tags": [
          "Listings"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "listings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "listing",
                  "id": "8d1e6c2a-…",
                  "shop": "maya",
                  "status": "sold",
                  "visibility": "everyone",
                  "step": "publish",
                  "name": "Le Creuset dutch oven",
                  "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                  "one_liner": "The good one, barely used, ready for soup season",
                  "description": "Bought it for a recipe I made twice. No chips…",
                  "category": "Kitchen",
                  "price": 185,
                  "lowest_price": 160,
                  "shipping": 18,
                  "take_offers": true,
                  "fields": [
                    {
                      "key": "brand",
                      "label": "Brand",
                      "value": "Le Creuset",
                      "source": "agent"
                    },
                    {
                      "key": "condition",
                      "label": "Condition",
                      "value": "Like new",
                      "source": "you"
                    }
                  ],
                  "photos": [
                    {
                      "id": "3f…",
                      "url": "https://files.resell.store/…",
                      "alt": null,
                      "source": null,
                      "is_video": false
                    }
                  ],
                  "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt",
                  "edit_url": "https://resell.store/listings/8d1e6c2a-…",
                  "stats": {
                    "views": 214,
                    "views_7d": 61,
                    "likes": 12,
                    "shares": 3,
                    "offers": 2,
                    "offers_waiting": 1
                  },
                  "research": {
                    "identified": "Le Creuset Signature round dutch oven, 5.5 qt, Soleil",
                    "category": "Kitchen",
                    "confidence": "high",
                    "suggested_price": 185,
                    "price_range": {
                      "low": 160,
                      "high": 210
                    },
                    "summary": "Sells quickly between $160 and $210 in this colour."
                  },
                  "published_at": "2026-09-28T16:02:11.000Z",
                  "sold_at": null,
                  "created_at": "2026-09-28T15:40:00.000Z",
                  "updated_at": "2026-09-28T16:02:11.000Z"
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/listings/{id}/relist": {
      "post": {
        "operationId": "post_listings_id_relist",
        "summary": "Relist",
        "description": "Puts a sold listing (or a draft) back up, at the same link.",
        "tags": [
          "Listings"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "listings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "listing",
                  "id": "8d1e6c2a-…",
                  "shop": "maya",
                  "status": "live",
                  "visibility": "everyone",
                  "step": "publish",
                  "name": "Le Creuset dutch oven",
                  "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                  "one_liner": "The good one, barely used, ready for soup season",
                  "description": "Bought it for a recipe I made twice. No chips…",
                  "category": "Kitchen",
                  "price": 185,
                  "lowest_price": 160,
                  "shipping": 18,
                  "take_offers": true,
                  "fields": [
                    {
                      "key": "brand",
                      "label": "Brand",
                      "value": "Le Creuset",
                      "source": "agent"
                    },
                    {
                      "key": "condition",
                      "label": "Condition",
                      "value": "Like new",
                      "source": "you"
                    }
                  ],
                  "photos": [
                    {
                      "id": "3f…",
                      "url": "https://files.resell.store/…",
                      "alt": null,
                      "source": null,
                      "is_video": false
                    }
                  ],
                  "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt",
                  "edit_url": "https://resell.store/listings/8d1e6c2a-…",
                  "stats": {
                    "views": 214,
                    "views_7d": 61,
                    "likes": 12,
                    "shares": 3,
                    "offers": 2,
                    "offers_waiting": 1
                  },
                  "research": {
                    "identified": "Le Creuset Signature round dutch oven, 5.5 qt, Soleil",
                    "category": "Kitchen",
                    "confidence": "high",
                    "suggested_price": 185,
                    "price_range": {
                      "low": 160,
                      "high": 210
                    },
                    "summary": "Sells quickly between $160 and $210 in this colour."
                  },
                  "published_at": "2026-09-28T16:02:11.000Z",
                  "sold_at": null,
                  "created_at": "2026-09-28T15:40:00.000Z",
                  "updated_at": "2026-09-28T16:02:11.000Z"
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/listings/{id}/photos": {
      "post": {
        "operationId": "post_listings_id_photos",
        "summary": "Add photos",
        "description": "Upload pictures as multipart form data (one or more `file` parts, up to 10 MB each, plus one video up to 40 MB), or send `urls` and we'll download them. New photos go at the end; your first own photo is always the cover.",
        "tags": [
          "Photos"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "listings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "urls": {
                    "description": "Public picture URLs to download, instead of uploading.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "string"
                      }
                    ]
                  },
                  "alt": {
                    "description": "A short description for screen readers.",
                    "type": "string",
                    "maxLength": 200
                  }
                }
              },
              "example": {
                "urls": [
                  "https://example.com/dutch-oven.jpg"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "urls": {
                    "description": "Public picture URLs to download, instead of uploading.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "string"
                      }
                    ]
                  },
                  "alt": {
                    "description": "A short description for screen readers.",
                    "type": "string",
                    "maxLength": 200
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "3f…",
                      "url": "https://files.resell.store/…",
                      "alt": null,
                      "source": null,
                      "is_video": false
                    }
                  ],
                  "total": 1,
                  "has_more": false
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/listings/{id}/photos/order": {
      "put": {
        "operationId": "put_listings_id_photos_order",
        "summary": "Reorder photos",
        "description": "Send every photo id in the order you want. The first must be one of your own photos (not a web picture or the video).",
        "tags": [
          "Photos"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "listings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "photo_ids": {
                    "description": "Every photo id on the listing, in order.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                },
                "required": [
                  "photo_ids"
                ]
              },
              "example": {
                "photo_ids": [
                  "3f…",
                  "9a…"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "photo_ids": {
                    "description": "Every photo id on the listing, in order.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                },
                "required": [
                  "photo_ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "3f…",
                      "url": "https://files.resell.store/…",
                      "alt": null,
                      "source": null,
                      "is_video": false
                    }
                  ],
                  "total": 1,
                  "has_more": false
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/listings/{id}/photos/{photoId}": {
      "delete": {
        "operationId": "delete_listings_id_photos_photoId",
        "summary": "Remove a photo",
        "tags": [
          "Photos"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "listings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "photoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "list",
                  "data": [],
                  "total": 0,
                  "has_more": false
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/listings/{id}/research": {
      "post": {
        "operationId": "post_listings_id_research",
        "summary": "Look it up",
        "description": "Starts the research agent on a listing: it works out what the item is from the photo and words, finds it in the catalog, checks second-hand prices and suggests a price. It runs in the background for about a minute; poll GET /listings/:id/research. If a run is already going, you get that one.",
        "tags": [
          "Research"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "listings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "research_run",
                  "id": "run_…",
                  "listing": "8d1e6c2a-…",
                  "status": "running",
                  "steps": []
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_listings_id_research",
        "summary": "Research results",
        "description": "The latest research run: each step's progress while it's `running`, then the findings when it's `done`: what it is, a price range and suggested price, facts, where the prices came from and questions worth answering.",
        "tags": [
          "Research"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "research_run",
                  "id": "run_…",
                  "listing": "8d1e6c2a-…",
                  "status": "done",
                  "steps": [
                    {
                      "key": "identify",
                      "state": "done",
                      "title": "Look at your photo",
                      "detail": "Le Creuset Signature, 5.5 qt"
                    }
                  ],
                  "findings": {
                    "identified": "Le Creuset Signature round dutch oven, 5.5 qt, Soleil",
                    "category": "Kitchen",
                    "confidence": "high",
                    "price": {
                      "min": 120,
                      "max": 260,
                      "band_low": 160,
                      "band_high": 210,
                      "suggested": 185
                    },
                    "facts": [
                      {
                        "label": "Retail price",
                        "value": "$420"
                      }
                    ],
                    "questions": [
                      {
                        "field": "condition",
                        "ask": "Any chips or stains inside?"
                      }
                    ],
                    "summary": "Sells quickly between $160 and $210 in this colour."
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/research": {
      "post": {
        "operationId": "post_research",
        "summary": "Look up an item",
        "description": "Shortcut for \"what's this worth?\": makes a draft from your words (and optional picture URLs) and starts the research agent on it. Poll GET /listings/:id/research with the listing id you get back. Delete the draft if you don't want to sell it.",
        "tags": [
          "Research"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "listings",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 500,
                    "description": "What it is, e.g. \"Le Creuset dutch oven 5.5 qt yellow\"."
                  },
                  "shop": {
                    "description": "Which shop the draft goes in. Defaults to your first.",
                    "type": "string"
                  },
                  "photo_urls": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                },
                "required": [
                  "query"
                ]
              },
              "example": {
                "query": "Le Creuset dutch oven 5.5 qt yellow"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 500,
                    "description": "What it is, e.g. \"Le Creuset dutch oven 5.5 qt yellow\"."
                  },
                  "shop": {
                    "description": "Which shop the draft goes in. Defaults to your first.",
                    "type": "string"
                  },
                  "photo_urls": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                },
                "required": [
                  "query"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "research_run",
                  "id": "run_…",
                  "listing": "8d1e6c2a-…",
                  "status": "running",
                  "steps": []
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/listings/{id}/words": {
      "post": {
        "operationId": "post_listings_id_words",
        "summary": "Write the words",
        "description": "The writing agent writes (or rewrites) the title, one-liner, description and teaser from the listing's details and research, in a tone you pick, and puts them on the listing. `instruction` can be \"shorter\", \"longer\", \"take\" (a fresh take) or anything you'd say to a writer.",
        "tags": [
          "Research"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "listings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "tone": {
                    "default": "Friendly",
                    "type": "string",
                    "enum": [
                      "Friendly",
                      "Playful",
                      "Straight to the point",
                      "A bit luxe"
                    ]
                  },
                  "instruction": {
                    "type": "string",
                    "maxLength": 500
                  }
                }
              },
              "example": {
                "tone": "Straight to the point"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "tone": {
                    "default": "Friendly",
                    "type": "string",
                    "enum": [
                      "Friendly",
                      "Playful",
                      "Straight to the point",
                      "A bit luxe"
                    ]
                  },
                  "instruction": {
                    "type": "string",
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "listing_words",
                  "listing": "8d1e6c2a-…",
                  "tone": "Straight to the point",
                  "title": "Le Creuset dutch oven, 5.5 qt, Soleil yellow",
                  "one_liner": "Used twice. No chips, no stains.",
                  "description": "Signature round dutch oven in Soleil…",
                  "teaser": "Used twice, like new"
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/offers": {
      "get": {
        "operationId": "get_offers",
        "summary": "List offers",
        "description": "Offers on your listings (`role=seller`, the default) or offers you've made (`role=buyer`), newest first. Status is as of now: an open offer past its deadline reads `expired`.",
        "tags": [
          "Offers"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "role",
            "in": "query",
            "required": false,
            "schema": {
              "default": "seller",
              "type": "string",
              "enum": [
                "seller",
                "buyer"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "countered",
                "accepted",
                "declined",
                "withdrawn",
                "expired",
                "paid"
              ]
            }
          },
          {
            "name": "listing",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Only offers on this listing id.",
              "type": "string"
            },
            "description": "Only offers on this listing id."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "description": "How many to return, 1 to 100. Default 25.",
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "How many to return, 1 to 100. Default 25."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "description": "How many to skip, for the next page.",
              "type": "integer",
              "minimum": 0,
              "maximum": 100000
            },
            "description": "How many to skip, for the next page."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "offer",
                      "id": "5b0f…",
                      "status": "open",
                      "amount": 150,
                      "counter": null,
                      "agreed": 150,
                      "note": "Could pick up this weekend.",
                      "deposit": null,
                      "expires_at": "2026-10-04T18:00:00.000Z",
                      "responded_at": null,
                      "created_at": "2026-10-02T18:00:00.000Z",
                      "listing": {
                        "id": "8d1e6c2a-…",
                        "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                        "price": 185,
                        "status": "live",
                        "photo": "https://files.resell.store/…",
                        "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt"
                      },
                      "shop": {
                        "slug": "maya",
                        "name": "Maya's closet"
                      },
                      "buyer": {
                        "name": "Jess"
                      }
                    }
                  ],
                  "total": 1,
                  "has_more": false
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post_offers",
        "summary": "Make an offer",
        "description": "Offers a price on a live listing that takes offers. It has to be under the asking price. The seller has 48 hours to answer; a new offer on the same listing replaces your last one.",
        "tags": [
          "Offers"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "buying",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "listing": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The listing id."
                  },
                  "amount": {
                    "description": "Your offer, in dollars.",
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100000
                  },
                  "note": {
                    "description": "A line for the seller.",
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "listing",
                  "amount"
                ]
              },
              "example": {
                "listing": "8d1e6c2a-…",
                "amount": 150,
                "note": "Could pick up this weekend."
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "listing": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The listing id."
                  },
                  "amount": {
                    "description": "Your offer, in dollars.",
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100000
                  },
                  "note": {
                    "description": "A line for the seller.",
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "listing",
                  "amount"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "offer",
                  "id": "5b0f…",
                  "status": "open",
                  "amount": 150,
                  "counter": null,
                  "agreed": 150,
                  "note": "Could pick up this weekend.",
                  "deposit": null,
                  "expires_at": "2026-10-04T18:00:00.000Z",
                  "responded_at": null,
                  "created_at": "2026-10-02T18:00:00.000Z",
                  "listing": {
                    "id": "8d1e6c2a-…",
                    "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                    "price": 185,
                    "status": "live",
                    "photo": "https://files.resell.store/…",
                    "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt"
                  },
                  "shop": {
                    "slug": "maya",
                    "name": "Maya's closet"
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/offers/{id}": {
      "get": {
        "operationId": "get_offers_id",
        "summary": "Get an offer",
        "description": "One offer, on your listing or made by you.",
        "tags": [
          "Offers"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "offer",
                  "id": "5b0f…",
                  "status": "open",
                  "amount": 150,
                  "counter": null,
                  "agreed": 150,
                  "note": "Could pick up this weekend.",
                  "deposit": null,
                  "expires_at": "2026-10-04T18:00:00.000Z",
                  "responded_at": null,
                  "created_at": "2026-10-02T18:00:00.000Z",
                  "listing": {
                    "id": "8d1e6c2a-…",
                    "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                    "price": 185,
                    "status": "live",
                    "photo": "https://files.resell.store/…",
                    "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt"
                  },
                  "shop": {
                    "slug": "maya",
                    "name": "Maya's closet"
                  },
                  "buyer": {
                    "name": "Jess"
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/offers/{id}/accept": {
      "post": {
        "operationId": "post_offers_id_accept",
        "summary": "Accept an offer",
        "description": "Says yes. The buyer gets an email and 48 hours to pay the offered amount.",
        "tags": [
          "Offers"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "offers",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {}
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "offer",
                  "id": "5b0f…",
                  "status": "accepted",
                  "amount": 150,
                  "counter": null,
                  "agreed": 150,
                  "note": "Could pick up this weekend.",
                  "deposit": null,
                  "expires_at": "2026-10-04T18:00:00.000Z",
                  "responded_at": "2026-10-02T19:00:00.000Z",
                  "created_at": "2026-10-02T18:00:00.000Z",
                  "listing": {
                    "id": "8d1e6c2a-…",
                    "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                    "price": 185,
                    "status": "live",
                    "photo": "https://files.resell.store/…",
                    "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt"
                  },
                  "shop": {
                    "slug": "maya",
                    "name": "Maya's closet"
                  },
                  "buyer": {
                    "name": "Jess"
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/offers/{id}/decline": {
      "post": {
        "operationId": "post_offers_id_decline",
        "summary": "Decline an offer",
        "description": "Says no, kindly. The buyer gets an email.",
        "tags": [
          "Offers"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "offers",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {}
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "offer",
                  "id": "5b0f…",
                  "status": "declined",
                  "amount": 150,
                  "counter": null,
                  "agreed": 150,
                  "note": "Could pick up this weekend.",
                  "deposit": null,
                  "expires_at": "2026-10-04T18:00:00.000Z",
                  "responded_at": "2026-10-02T19:00:00.000Z",
                  "created_at": "2026-10-02T18:00:00.000Z",
                  "listing": {
                    "id": "8d1e6c2a-…",
                    "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                    "price": 185,
                    "status": "live",
                    "photo": "https://files.resell.store/…",
                    "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt"
                  },
                  "shop": {
                    "slug": "maya",
                    "name": "Maya's closet"
                  },
                  "buyer": {
                    "name": "Jess"
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/offers/{id}/counter": {
      "post": {
        "operationId": "post_offers_id_counter",
        "summary": "Counter an offer",
        "description": "Names your price. It has to sit between their offer and your asking price. The buyer has 48 hours to take it.",
        "tags": [
          "Offers"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "offers",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "amount": {
                    "description": "Your counter, in dollars.",
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100000
                  }
                },
                "required": [
                  "amount"
                ]
              },
              "example": {
                "amount": 170
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "amount": {
                    "description": "Your counter, in dollars.",
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100000
                  }
                },
                "required": [
                  "amount"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "offer",
                  "id": "5b0f…",
                  "status": "countered",
                  "amount": 150,
                  "counter": 170,
                  "agreed": 170,
                  "note": "Could pick up this weekend.",
                  "deposit": null,
                  "expires_at": "2026-10-04T18:00:00.000Z",
                  "responded_at": "2026-10-02T19:00:00.000Z",
                  "created_at": "2026-10-02T18:00:00.000Z",
                  "listing": {
                    "id": "8d1e6c2a-…",
                    "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                    "price": 185,
                    "status": "live",
                    "photo": "https://files.resell.store/…",
                    "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt"
                  },
                  "shop": {
                    "slug": "maya",
                    "name": "Maya's closet"
                  },
                  "buyer": {
                    "name": "Jess"
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/offers/{id}/withdraw": {
      "post": {
        "operationId": "post_offers_id_withdraw",
        "summary": "Withdraw your offer",
        "description": "Takes back an offer that's still open or countered.",
        "tags": [
          "Offers"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "buying",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "offer",
                  "id": "5b0f…",
                  "status": "withdrawn",
                  "amount": 150,
                  "counter": null,
                  "agreed": 150,
                  "note": "Could pick up this weekend.",
                  "deposit": null,
                  "expires_at": "2026-10-04T18:00:00.000Z",
                  "responded_at": null,
                  "created_at": "2026-10-02T18:00:00.000Z",
                  "listing": {
                    "id": "8d1e6c2a-…",
                    "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                    "price": 185,
                    "status": "live",
                    "photo": "https://files.resell.store/…",
                    "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt"
                  },
                  "shop": {
                    "slug": "maya",
                    "name": "Maya's closet"
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/offers/{id}/accept-counter": {
      "post": {
        "operationId": "post_offers_id_accept_counter",
        "summary": "Take the counter",
        "description": "Agrees to the seller's counter. You then have 48 hours to pay (see POST /checkout).",
        "tags": [
          "Offers"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "buying",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "offer",
                  "id": "5b0f…",
                  "status": "accepted",
                  "amount": 150,
                  "counter": null,
                  "agreed": 150,
                  "note": "Could pick up this weekend.",
                  "deposit": null,
                  "expires_at": "2026-10-04T18:00:00.000Z",
                  "responded_at": null,
                  "created_at": "2026-10-02T18:00:00.000Z",
                  "listing": {
                    "id": "8d1e6c2a-…",
                    "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                    "price": 185,
                    "status": "live",
                    "photo": "https://files.resell.store/…",
                    "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt"
                  },
                  "shop": {
                    "slug": "maya",
                    "name": "Maya's closet"
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/offers/{id}/decline-counter": {
      "post": {
        "operationId": "post_offers_id_decline_counter",
        "summary": "Turn down the counter",
        "description": "Says no to the seller's counter. The offer ends.",
        "tags": [
          "Offers"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "buying",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "offer",
                  "id": "5b0f…",
                  "status": "declined",
                  "amount": 150,
                  "counter": null,
                  "agreed": 150,
                  "note": "Could pick up this weekend.",
                  "deposit": null,
                  "expires_at": "2026-10-04T18:00:00.000Z",
                  "responded_at": null,
                  "created_at": "2026-10-02T18:00:00.000Z",
                  "listing": {
                    "id": "8d1e6c2a-…",
                    "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                    "price": 185,
                    "status": "live",
                    "photo": "https://files.resell.store/…",
                    "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt"
                  },
                  "shop": {
                    "slug": "maya",
                    "name": "Maya's closet"
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sales": {
      "get": {
        "operationId": "get_sales",
        "summary": "List sales",
        "description": "What's sold across your shops, newest first: who bought it, where it ships, and what you get once the money's released.",
        "tags": [
          "Sales"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "description": "`paid` means it's waiting for you to ship.",
              "type": "string",
              "enum": [
                "paid",
                "shipped",
                "delivered",
                "completed",
                "refunded",
                "cancelled"
              ]
            },
            "description": "`paid` means it's waiting for you to ship."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "description": "How many to return, 1 to 100. Default 25.",
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "How many to return, 1 to 100. Default 25."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "description": "How many to skip, for the next page.",
              "type": "integer",
              "minimum": 0,
              "maximum": 100000
            },
            "description": "How many to skip, for the next page."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "order",
                      "id": "a71c…",
                      "status": "paid",
                      "item": 170,
                      "shipping": 18,
                      "total": 188,
                      "delivery": "tracked",
                      "tracking_number": null,
                      "offer": "5b0f…",
                      "listing": {
                        "id": "8d1e6c2a-…",
                        "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                        "price": 185,
                        "status": "live",
                        "photo": "https://files.resell.store/…",
                        "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt"
                      },
                      "shop": {
                        "slug": "maya",
                        "name": "Maya's closet"
                      },
                      "buyer": {
                        "name": "Jess"
                      },
                      "ship_to": {
                        "name": "Jess Park",
                        "address": "12 Elm St, Portland, OR 97201",
                        "country": "United States"
                      },
                      "payout": {
                        "provider": "paypal",
                        "platform_fee": 17,
                        "paypal_fee": 6.86,
                        "seller_net": 164.14,
                        "released_at": null
                      },
                      "paid_at": "2026-10-02T18:30:00.000Z",
                      "shipped_at": null,
                      "delivered_at": null,
                      "completed_at": null
                    }
                  ],
                  "total": 1,
                  "has_more": false
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sales/{id}": {
      "get": {
        "operationId": "get_sales_id",
        "summary": "Get a sale",
        "tags": [
          "Sales"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "order",
                  "id": "a71c…",
                  "status": "paid",
                  "item": 170,
                  "shipping": 18,
                  "total": 188,
                  "delivery": "tracked",
                  "tracking_number": null,
                  "offer": "5b0f…",
                  "listing": {
                    "id": "8d1e6c2a-…",
                    "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                    "price": 185,
                    "status": "live",
                    "photo": "https://files.resell.store/…",
                    "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt"
                  },
                  "shop": {
                    "slug": "maya",
                    "name": "Maya's closet"
                  },
                  "buyer": {
                    "name": "Jess"
                  },
                  "ship_to": {
                    "name": "Jess Park",
                    "address": "12 Elm St, Portland, OR 97201",
                    "country": "United States"
                  },
                  "payout": {
                    "provider": "paypal",
                    "platform_fee": 17,
                    "paypal_fee": 6.86,
                    "seller_net": 164.14,
                    "released_at": null
                  },
                  "paid_at": "2026-10-02T18:30:00.000Z",
                  "shipped_at": null,
                  "delivered_at": null,
                  "completed_at": null
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sales/{id}/ship": {
      "post": {
        "operationId": "post_sales_id_ship",
        "summary": "Mark shipped",
        "description": "Says it's in the post, with a tracking number if you have one. The buyer gets an email with the tracking link. The money is released when they confirm it arrived.",
        "tags": [
          "Sales"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "orders",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "tracking_number": {
                    "type": "string",
                    "maxLength": 80
                  }
                }
              },
              "example": {
                "tracking_number": "9400111899223197428490"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "tracking_number": {
                    "type": "string",
                    "maxLength": 80
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "order",
                  "id": "a71c…",
                  "status": "shipped",
                  "item": 170,
                  "shipping": 18,
                  "total": 188,
                  "delivery": "tracked",
                  "tracking_number": "9400111899223197428490",
                  "offer": "5b0f…",
                  "listing": {
                    "id": "8d1e6c2a-…",
                    "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                    "price": 185,
                    "status": "live",
                    "photo": "https://files.resell.store/…",
                    "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt"
                  },
                  "shop": {
                    "slug": "maya",
                    "name": "Maya's closet"
                  },
                  "buyer": {
                    "name": "Jess"
                  },
                  "ship_to": {
                    "name": "Jess Park",
                    "address": "12 Elm St, Portland, OR 97201",
                    "country": "United States"
                  },
                  "payout": {
                    "provider": "paypal",
                    "platform_fee": 17,
                    "paypal_fee": 6.86,
                    "seller_net": 164.14,
                    "released_at": null
                  },
                  "paid_at": "2026-10-02T18:30:00.000Z",
                  "shipped_at": "2026-10-03T15:00:00.000Z",
                  "delivered_at": null,
                  "completed_at": null
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/orders": {
      "get": {
        "operationId": "get_orders",
        "summary": "List your orders",
        "description": "Things you've bought, newest first.",
        "tags": [
          "Buying"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "paid",
                "shipped",
                "delivered",
                "completed",
                "refunded",
                "cancelled"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "description": "How many to return, 1 to 100. Default 25.",
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "How many to return, 1 to 100. Default 25."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "description": "How many to skip, for the next page.",
              "type": "integer",
              "minimum": 0,
              "maximum": 100000
            },
            "description": "How many to skip, for the next page."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "order",
                      "id": "a71c…",
                      "status": "shipped",
                      "item": 170,
                      "shipping": 18,
                      "total": 188,
                      "delivery": "tracked",
                      "tracking_number": null,
                      "offer": "5b0f…",
                      "listing": {
                        "id": "8d1e6c2a-…",
                        "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                        "price": 185,
                        "status": "live",
                        "photo": "https://files.resell.store/…",
                        "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt"
                      },
                      "shop": {
                        "slug": "maya",
                        "name": "Maya's closet"
                      },
                      "ship_to": {
                        "name": "Jess Park",
                        "address": "12 Elm St, Portland, OR 97201",
                        "country": "United States"
                      },
                      "paid_at": "2026-10-02T18:30:00.000Z",
                      "shipped_at": null,
                      "delivered_at": null,
                      "completed_at": null
                    }
                  ],
                  "total": 1,
                  "has_more": false
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/orders/{id}": {
      "get": {
        "operationId": "get_orders_id",
        "summary": "Get an order",
        "tags": [
          "Buying"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "order",
                  "id": "a71c…",
                  "status": "paid",
                  "item": 170,
                  "shipping": 18,
                  "total": 188,
                  "delivery": "tracked",
                  "tracking_number": null,
                  "offer": "5b0f…",
                  "listing": {
                    "id": "8d1e6c2a-…",
                    "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                    "price": 185,
                    "status": "live",
                    "photo": "https://files.resell.store/…",
                    "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt"
                  },
                  "shop": {
                    "slug": "maya",
                    "name": "Maya's closet"
                  },
                  "ship_to": {
                    "name": "Jess Park",
                    "address": "12 Elm St, Portland, OR 97201",
                    "country": "United States"
                  },
                  "paid_at": "2026-10-02T18:30:00.000Z",
                  "shipped_at": null,
                  "delivered_at": null,
                  "completed_at": null
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/orders/{id}/confirm": {
      "post": {
        "operationId": "post_orders_id_confirm",
        "summary": "It arrived, all good",
        "description": "Confirms the item arrived as described. This releases the held money to the seller, so only call it once you have it.",
        "tags": [
          "Buying"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "buying",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "order",
                  "id": "a71c…",
                  "status": "completed",
                  "item": 170,
                  "shipping": 18,
                  "total": 188,
                  "delivery": "tracked",
                  "tracking_number": null,
                  "offer": "5b0f…",
                  "listing": {
                    "id": "8d1e6c2a-…",
                    "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                    "price": 185,
                    "status": "live",
                    "photo": "https://files.resell.store/…",
                    "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt"
                  },
                  "shop": {
                    "slug": "maya",
                    "name": "Maya's closet"
                  },
                  "ship_to": {
                    "name": "Jess Park",
                    "address": "12 Elm St, Portland, OR 97201",
                    "country": "United States"
                  },
                  "paid_at": "2026-10-02T18:30:00.000Z",
                  "shipped_at": null,
                  "delivered_at": null,
                  "completed_at": null
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/checkout": {
      "post": {
        "operationId": "post_checkout",
        "summary": "Get a checkout link",
        "description": "Paying always happens with a person at the wheel: this gives you the checkout page for a listing (at an accepted offer's price, if you have one) to open in a browser, where the buyer pays with PayPal. Nothing is charged by this call.",
        "tags": [
          "Buying"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "buying",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "listing": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The listing id."
                  }
                },
                "required": [
                  "listing"
                ]
              },
              "example": {
                "listing": "8d1e6c2a-…"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "listing": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The listing id."
                  }
                },
                "required": [
                  "listing"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "checkout_link",
                  "listing": "8d1e6c2a-…",
                  "price": 185,
                  "url": "https://resell.store/checkout/8d1e6c2a-…"
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/orders/{id}/cancel": {
      "post": {
        "operationId": "post_orders_id_cancel",
        "summary": "Cancel an order that hasn't shipped",
        "description": "Once the ship-by date (3 days after paying) has passed without it shipping, the buyer can call it off and gets everything back.",
        "tags": [
          "Buying"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "buying",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "problem",
                  "order": "a71c…",
                  "order_status": "cancelled",
                  "refunded": 188,
                  "problem": null
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/orders/{id}/problem": {
      "get": {
        "operationId": "get_orders_id_problem",
        "summary": "Get the problem on an order",
        "description": "The latest problem reported on an order, with everything both sides said. `problem` is null if there's never been one.",
        "tags": [
          "Buying"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "problem",
                  "order": "a71c…",
                  "order_status": "shipped",
                  "refunded": 0,
                  "problem": {
                    "id": "d3f0…",
                    "status": "open",
                    "source": "buyer",
                    "reason": "damaged",
                    "details": "The lid arrived chipped.",
                    "refund_offered": null,
                    "escalated_at": null,
                    "resolved_at": null,
                    "created_at": "2026-10-05T10:00:00.000Z",
                    "events": [
                      {
                        "side": "buyer",
                        "kind": "opened",
                        "body": "The lid arrived chipped.",
                        "amount": null,
                        "created_at": "2026-10-05T10:00:00.000Z"
                      }
                    ]
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post_orders_id_problem",
        "summary": "Report a problem",
        "description": "For an order that's shipped. The seller is told, and the held money isn't released until it's sorted.",
        "tags": [
          "Buying"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "buying",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "enum": [
                      "not_arrived",
                      "not_as_described",
                      "damaged",
                      "other"
                    ]
                  },
                  "details": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000,
                    "description": "What's wrong, in the buyer's words. The seller reads this."
                  }
                },
                "required": [
                  "reason",
                  "details"
                ]
              },
              "example": {
                "reason": "damaged",
                "details": "The lid arrived chipped."
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "enum": [
                      "not_arrived",
                      "not_as_described",
                      "damaged",
                      "other"
                    ]
                  },
                  "details": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000,
                    "description": "What's wrong, in the buyer's words. The seller reads this."
                  }
                },
                "required": [
                  "reason",
                  "details"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "problem",
                  "order": "a71c…",
                  "order_status": "shipped",
                  "refunded": 0,
                  "problem": {
                    "id": "d3f0…",
                    "status": "open",
                    "source": "buyer",
                    "reason": "damaged",
                    "details": "The lid arrived chipped.",
                    "refund_offered": null,
                    "escalated_at": null,
                    "resolved_at": null,
                    "created_at": "2026-10-05T10:00:00.000Z",
                    "events": [
                      {
                        "side": "buyer",
                        "kind": "opened",
                        "body": "The lid arrived chipped.",
                        "amount": null,
                        "created_at": "2026-10-05T10:00:00.000Z"
                      }
                    ]
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/orders/{id}/problem/answer": {
      "post": {
        "operationId": "post_orders_id_problem_answer",
        "summary": "Answer a refund offer",
        "description": "Take the part refund the seller offered (the rest goes to them and the order is done), or turn it down.",
        "tags": [
          "Buying"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "buying",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "accept": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "accept"
                ]
              },
              "example": {
                "accept": true
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "accept": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "accept"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "problem",
                  "order": "a71c…",
                  "order_status": "completed",
                  "refunded": 40,
                  "problem": {
                    "id": "d3f0…",
                    "status": "open",
                    "source": "buyer",
                    "reason": "damaged",
                    "details": "The lid arrived chipped.",
                    "refund_offered": null,
                    "escalated_at": null,
                    "resolved_at": null,
                    "created_at": "2026-10-05T10:00:00.000Z",
                    "events": [
                      {
                        "side": "buyer",
                        "kind": "opened",
                        "body": "The lid arrived chipped.",
                        "amount": null,
                        "created_at": "2026-10-05T10:00:00.000Z"
                      }
                    ]
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/orders/{id}/problem/close": {
      "post": {
        "operationId": "post_orders_id_problem_close",
        "summary": "Say a problem is sorted",
        "description": "Closes the problem without a refund. The order goes back to its usual timer and the seller is paid as normal.",
        "tags": [
          "Buying"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "buying",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "problem",
                  "order": "a71c…",
                  "order_status": "shipped",
                  "refunded": 0,
                  "problem": {
                    "id": "d3f0…",
                    "status": "closed",
                    "source": "buyer",
                    "reason": "damaged",
                    "details": "The lid arrived chipped.",
                    "refund_offered": null,
                    "escalated_at": null,
                    "resolved_at": null,
                    "created_at": "2026-10-05T10:00:00.000Z",
                    "events": [
                      {
                        "side": "buyer",
                        "kind": "opened",
                        "body": "The lid arrived chipped.",
                        "amount": null,
                        "created_at": "2026-10-05T10:00:00.000Z"
                      }
                    ]
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sales/{id}/cancel": {
      "post": {
        "operationId": "post_sales_id_cancel",
        "summary": "Cancel a sale you can't send",
        "description": "Before it ships. The buyer gets everything back and the listing goes back on sale. Needs a full API key.",
        "tags": [
          "Sales"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "orders",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "problem",
                  "order": "a71c…",
                  "order_status": "cancelled",
                  "refunded": 188,
                  "problem": null
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sales/{id}/problem": {
      "get": {
        "operationId": "get_sales_id_problem",
        "summary": "Get the problem on a sale",
        "tags": [
          "Sales"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "problem",
                  "order": "a71c…",
                  "order_status": "shipped",
                  "refunded": 0,
                  "problem": {
                    "id": "d3f0…",
                    "status": "open",
                    "source": "buyer",
                    "reason": "damaged",
                    "details": "The lid arrived chipped.",
                    "refund_offered": null,
                    "escalated_at": null,
                    "resolved_at": null,
                    "created_at": "2026-10-05T10:00:00.000Z",
                    "events": [
                      {
                        "side": "buyer",
                        "kind": "opened",
                        "body": "The lid arrived chipped.",
                        "amount": null,
                        "created_at": "2026-10-05T10:00:00.000Z"
                      }
                    ]
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sales/{id}/problem/refund": {
      "post": {
        "operationId": "post_sales_id_problem_refund",
        "summary": "Refund for a problem",
        "description": "With `amount`, offers that much back for the buyer to take or leave. Without it, refunds everything now. Needs a full API key.",
        "tags": [
          "Sales"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "orders",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "amount": {
                    "description": "Dollars to offer back. Leave out to refund in full.",
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 100000
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 2000
                  }
                }
              },
              "example": {
                "amount": 40,
                "note": "Sorry about the lid."
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "amount": {
                    "description": "Dollars to offer back. Leave out to refund in full.",
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 100000
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 2000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "problem",
                  "order": "a71c…",
                  "order_status": "shipped",
                  "refunded": 0,
                  "problem": {
                    "id": "d3f0…",
                    "status": "open",
                    "source": "buyer",
                    "reason": "damaged",
                    "details": "The lid arrived chipped.",
                    "refund_offered": 40,
                    "escalated_at": null,
                    "resolved_at": null,
                    "created_at": "2026-10-05T10:00:00.000Z",
                    "events": [
                      {
                        "side": "buyer",
                        "kind": "opened",
                        "body": "The lid arrived chipped.",
                        "amount": null,
                        "created_at": "2026-10-05T10:00:00.000Z"
                      }
                    ]
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/orders/{id}/problem/reply": {
      "post": {
        "operationId": "post_orders_id_problem_reply",
        "summary": "Reply about a problem",
        "tags": [
          "Buying"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "buying",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  }
                },
                "required": [
                  "body"
                ]
              },
              "example": {
                "body": "Could you send a photo?"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  }
                },
                "required": [
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "problem",
                  "order": "a71c…",
                  "order_status": "shipped",
                  "refunded": 0,
                  "problem": {
                    "id": "d3f0…",
                    "status": "open",
                    "source": "buyer",
                    "reason": "damaged",
                    "details": "The lid arrived chipped.",
                    "refund_offered": null,
                    "escalated_at": null,
                    "resolved_at": null,
                    "created_at": "2026-10-05T10:00:00.000Z",
                    "events": [
                      {
                        "side": "buyer",
                        "kind": "opened",
                        "body": "The lid arrived chipped.",
                        "amount": null,
                        "created_at": "2026-10-05T10:00:00.000Z"
                      }
                    ]
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/orders/{id}/problem/escalate": {
      "post": {
        "operationId": "post_orders_id_problem_escalate",
        "summary": "Ask resell.store to step in",
        "description": "We read both sides and decide. The money stays held until then.",
        "tags": [
          "Buying"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "buying",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "note": {
                    "type": "string",
                    "maxLength": 2000
                  }
                }
              },
              "example": {}
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "note": {
                    "type": "string",
                    "maxLength": 2000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "problem",
                  "order": "a71c…",
                  "order_status": "shipped",
                  "refunded": 0,
                  "problem": {
                    "id": "d3f0…",
                    "status": "escalated",
                    "source": "buyer",
                    "reason": "damaged",
                    "details": "The lid arrived chipped.",
                    "refund_offered": null,
                    "escalated_at": null,
                    "resolved_at": null,
                    "created_at": "2026-10-05T10:00:00.000Z",
                    "events": [
                      {
                        "side": "buyer",
                        "kind": "opened",
                        "body": "The lid arrived chipped.",
                        "amount": null,
                        "created_at": "2026-10-05T10:00:00.000Z"
                      }
                    ]
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sales/{id}/problem/reply": {
      "post": {
        "operationId": "post_sales_id_problem_reply",
        "summary": "Reply about a problem",
        "tags": [
          "Sales"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "orders",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  }
                },
                "required": [
                  "body"
                ]
              },
              "example": {
                "body": "Could you send a photo?"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  }
                },
                "required": [
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "problem",
                  "order": "a71c…",
                  "order_status": "shipped",
                  "refunded": 0,
                  "problem": {
                    "id": "d3f0…",
                    "status": "open",
                    "source": "buyer",
                    "reason": "damaged",
                    "details": "The lid arrived chipped.",
                    "refund_offered": null,
                    "escalated_at": null,
                    "resolved_at": null,
                    "created_at": "2026-10-05T10:00:00.000Z",
                    "events": [
                      {
                        "side": "buyer",
                        "kind": "opened",
                        "body": "The lid arrived chipped.",
                        "amount": null,
                        "created_at": "2026-10-05T10:00:00.000Z"
                      }
                    ]
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sales/{id}/problem/escalate": {
      "post": {
        "operationId": "post_sales_id_problem_escalate",
        "summary": "Ask resell.store to step in",
        "description": "We read both sides and decide. The money stays held until then.",
        "tags": [
          "Sales"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "orders",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "note": {
                    "type": "string",
                    "maxLength": 2000
                  }
                }
              },
              "example": {}
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "note": {
                    "type": "string",
                    "maxLength": 2000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "problem",
                  "order": "a71c…",
                  "order_status": "shipped",
                  "refunded": 0,
                  "problem": {
                    "id": "d3f0…",
                    "status": "escalated",
                    "source": "buyer",
                    "reason": "damaged",
                    "details": "The lid arrived chipped.",
                    "refund_offered": null,
                    "escalated_at": null,
                    "resolved_at": null,
                    "created_at": "2026-10-05T10:00:00.000Z",
                    "events": [
                      {
                        "side": "buyer",
                        "kind": "opened",
                        "body": "The lid arrived chipped.",
                        "amount": null,
                        "created_at": "2026-10-05T10:00:00.000Z"
                      }
                    ]
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/stores/{slug}/reviews": {
      "get": {
        "operationId": "get_stores_slug_reviews",
        "summary": "Read a store's reviews",
        "description": "What buyers said about a store, newest first, with the seller's replies. Only people who bought can review, and only public reviews show. No key needed. Pass `next_cursor` back as `cursor` for the next page.",
        "tags": [
          "Marketplace"
        ],
        "security": [
          {},
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rating",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Only reviews with this many stars.",
              "type": "integer",
              "minimum": 1,
              "maximum": 5
            },
            "description": "Only reviews with this many stars."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 10,
              "description": "How many to return, 1 to 50. Default 10.",
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "How many to return, 1 to 50. Default 10."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "description": "`next_cursor` from the page before.",
              "type": "string",
              "maxLength": 64
            },
            "description": "`next_cursor` from the page before."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "list",
                  "rating": {
                    "average": 4.8,
                    "count": 12
                  },
                  "data": [
                    {
                      "object": "review",
                      "id": "5b2e…",
                      "rating": 5,
                      "body": "Exactly like the photos, and packed with a little note.",
                      "from": "Priya",
                      "created_at": "2026-10-05T10:00:00.000Z",
                      "reply": {
                        "body": "Thank you, Priya! Enjoy it.",
                        "created_at": "2026-10-05T12:00:00.000Z"
                      },
                      "listing": {
                        "id": "8d1e6c2a-…",
                        "title": "Linen wrap dress",
                        "url": "https://maya.resell.store/linen-wrap-dress"
                      },
                      "shop": {
                        "slug": "maya",
                        "name": "Maya's closet"
                      }
                    }
                  ],
                  "next_cursor": "5b2e…",
                  "has_more": true
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/orders/{id}/review": {
      "post": {
        "operationId": "post_orders_id_review",
        "summary": "Review an order",
        "description": "Once an order is done (the buyer said it's all good, or the check window closed), the buyer can give it 1 to 5 stars and a few words. One review per order. Set `public` to false to send it only to the seller.",
        "tags": [
          "Buying"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "buying",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "rating": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 5,
                    "description": "1 to 5 stars."
                  },
                  "body": {
                    "description": "A few words, up to 1,000 characters. Optional.",
                    "type": "string",
                    "maxLength": 5000
                  },
                  "public": {
                    "description": "Show it on the shop and the listing. Default true.",
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1",
                          "true",
                          "false",
                          "yes",
                          "no",
                          "on",
                          "off"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "rating"
                ]
              },
              "example": {
                "rating": 5,
                "body": "Exactly like the photos, and packed with a little note.",
                "public": true
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "rating": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 5,
                    "description": "1 to 5 stars."
                  },
                  "body": {
                    "description": "A few words, up to 1,000 characters. Optional.",
                    "type": "string",
                    "maxLength": 5000
                  },
                  "public": {
                    "description": "Show it on the shop and the listing. Default true.",
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1",
                          "true",
                          "false",
                          "yes",
                          "no",
                          "on",
                          "off"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "rating"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "review",
                  "id": "5b2e…",
                  "rating": 5,
                  "body": "Exactly like the photos, and packed with a little note.",
                  "from": "Priya",
                  "created_at": "2026-10-05T10:00:00.000Z",
                  "reply": null,
                  "listing": {
                    "id": "8d1e6c2a-…",
                    "title": "Linen wrap dress",
                    "url": "https://maya.resell.store/linen-wrap-dress"
                  },
                  "shop": {
                    "slug": "maya",
                    "name": "Maya's closet"
                  },
                  "order": "a71c…",
                  "public": true,
                  "hidden": false
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_orders_id_review",
        "summary": "Get your review of an order",
        "description": "The review the buyer left on an order, with the seller's reply. 404 if there isn't one yet.",
        "tags": [
          "Buying"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "review",
                  "id": "5b2e…",
                  "rating": 5,
                  "body": "Exactly like the photos, and packed with a little note.",
                  "from": "Priya",
                  "created_at": "2026-10-05T10:00:00.000Z",
                  "reply": {
                    "body": "Thank you, Priya! Enjoy it.",
                    "created_at": "2026-10-05T12:00:00.000Z"
                  },
                  "listing": {
                    "id": "8d1e6c2a-…",
                    "title": "Linen wrap dress",
                    "url": "https://maya.resell.store/linen-wrap-dress"
                  },
                  "shop": {
                    "slug": "maya",
                    "name": "Maya's closet"
                  },
                  "order": "a71c…",
                  "public": true,
                  "hidden": false
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/reviews": {
      "get": {
        "operationId": "get_reviews",
        "summary": "List reviews of your shops",
        "description": "Every review on your shops, newest first, including private ones (only you see those) and any resell.store took down (`hidden`).",
        "tags": [
          "Sales"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "shop",
            "in": "query",
            "required": false,
            "schema": {
              "description": "A shop's slug, to list just that one.",
              "type": "string",
              "maxLength": 64
            },
            "description": "A shop's slug, to list just that one."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 100000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "review",
                      "id": "5b2e…",
                      "rating": 5,
                      "body": "Exactly like the photos, and packed with a little note.",
                      "from": "Priya",
                      "created_at": "2026-10-05T10:00:00.000Z",
                      "reply": {
                        "body": "Thank you, Priya! Enjoy it.",
                        "created_at": "2026-10-05T12:00:00.000Z"
                      },
                      "listing": {
                        "id": "8d1e6c2a-…",
                        "title": "Linen wrap dress",
                        "url": "https://maya.resell.store/linen-wrap-dress"
                      },
                      "shop": {
                        "slug": "maya",
                        "name": "Maya's closet"
                      },
                      "order": "a71c…",
                      "public": true,
                      "hidden": false
                    }
                  ],
                  "total": 1,
                  "has_more": false
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/reviews/{id}/reply": {
      "post": {
        "operationId": "post_reviews_id_reply",
        "summary": "Reply to a review",
        "description": "Answer a review on one of your shops. It shows under the review. There's one reply per review; sending again changes it.",
        "tags": [
          "Sales"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "shops",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "maxLength": 5000,
                    "description": "Your reply, up to 1,000 characters."
                  }
                },
                "required": [
                  "body"
                ]
              },
              "example": {
                "body": "Thank you, Priya! Enjoy it."
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "maxLength": 5000,
                    "description": "Your reply, up to 1,000 characters."
                  }
                },
                "required": [
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "review",
                  "id": "5b2e…",
                  "rating": 5,
                  "body": "Exactly like the photos, and packed with a little note.",
                  "from": "Priya",
                  "created_at": "2026-10-05T10:00:00.000Z",
                  "reply": {
                    "body": "Thank you, Priya! Enjoy it.",
                    "created_at": "2026-10-05T12:00:00.000Z"
                  },
                  "listing": {
                    "id": "8d1e6c2a-…",
                    "title": "Linen wrap dress",
                    "url": "https://maya.resell.store/linen-wrap-dress"
                  },
                  "shop": {
                    "slug": "maya",
                    "name": "Maya's closet"
                  },
                  "order": "a71c…",
                  "public": true,
                  "hidden": false
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/threads": {
      "get": {
        "operationId": "get_threads",
        "summary": "List conversations",
        "description": "Conversations with buyers across your shops (`role=seller`, the default) or with shops you've written to (`role=buyer`), most recent first.",
        "tags": [
          "Messages"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "role",
            "in": "query",
            "required": false,
            "schema": {
              "default": "seller",
              "type": "string",
              "enum": [
                "seller",
                "buyer"
              ]
            }
          },
          {
            "name": "unread",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Only conversations waiting on you.",
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "enum": [
                    "0",
                    "1",
                    "true",
                    "false",
                    "yes",
                    "no",
                    "on",
                    "off"
                  ]
                }
              ]
            },
            "description": "Only conversations waiting on you."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "description": "How many to return, 1 to 100. Default 25.",
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "How many to return, 1 to 100. Default 25."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "description": "How many to skip, for the next page.",
              "type": "integer",
              "minimum": 0,
              "maximum": 100000
            },
            "description": "How many to skip, for the next page."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "thread",
                      "id": "t_91c…",
                      "with": "Jess",
                      "shop": {
                        "slug": "maya",
                        "name": "Maya's closet"
                      },
                      "listing": {
                        "id": "8d1e6c2a-…",
                        "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                        "photo": "https://files.resell.store/…",
                        "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt"
                      },
                      "preview": "Is the lid included?",
                      "last_from": "them",
                      "unread": true,
                      "needs_you": false,
                      "last_message_at": "2026-10-02T17:42:00.000Z"
                    }
                  ],
                  "total": 1,
                  "has_more": false
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post_threads",
        "summary": "Message a shop",
        "description": "Writes to a shop as a buyer, about one of its listings or in general. If you've written to them about it before, the message goes in that conversation.",
        "tags": [
          "Messages"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "buying",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "shop": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "The shop's slug."
                  },
                  "listing": {
                    "description": "A listing id, if it's about one.",
                    "type": "string",
                    "maxLength": 64
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  }
                },
                "required": [
                  "shop",
                  "body"
                ]
              },
              "example": {
                "shop": "maya",
                "listing": "8d1e6c2a-…",
                "body": "Hi! Is the lid included?"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "shop": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "The shop's slug."
                  },
                  "listing": {
                    "description": "A listing id, if it's about one.",
                    "type": "string",
                    "maxLength": 64
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  }
                },
                "required": [
                  "shop",
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "thread",
                  "id": "t_91c…",
                  "with": "Maya's closet",
                  "shop": {
                    "slug": "maya",
                    "name": "Maya's closet"
                  },
                  "listing": {
                    "id": "8d1e6c2a-…",
                    "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                    "photo": "https://files.resell.store/…",
                    "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt"
                  },
                  "preview": "Is the lid included?",
                  "last_from": "you",
                  "unread": false,
                  "needs_you": false,
                  "last_message_at": "2026-10-02T17:42:00.000Z",
                  "role": "buyer",
                  "messages": []
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/threads/{id}": {
      "get": {
        "operationId": "get_threads_id",
        "summary": "Read a conversation",
        "description": "The whole conversation, oldest message first. Reading it here doesn't mark it read; POST /threads/:id/read does.",
        "tags": [
          "Messages"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "thread",
                  "id": "t_91c…",
                  "with": "Jess",
                  "shop": {
                    "slug": "maya",
                    "name": "Maya's closet"
                  },
                  "listing": {
                    "id": "8d1e6c2a-…",
                    "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                    "photo": "https://files.resell.store/…",
                    "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt"
                  },
                  "preview": "Is the lid included?",
                  "last_from": "them",
                  "unread": true,
                  "needs_you": false,
                  "last_message_at": "2026-10-02T17:42:00.000Z",
                  "role": "seller",
                  "messages": [
                    {
                      "id": "m_1",
                      "from": "them",
                      "by_agent": false,
                      "body": "Hi! Is the lid included?",
                      "created_at": "2026-10-02T17:42:00.000Z"
                    },
                    {
                      "id": "m_2",
                      "from": "you",
                      "by_agent": false,
                      "body": "It is, and it fits snugly.",
                      "created_at": "2026-10-02T17:50:00.000Z"
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/threads/{id}/messages": {
      "post": {
        "operationId": "post_threads_id_messages",
        "summary": "Reply",
        "description": "Sends a message in a conversation, from whichever side you're on. Sending also marks it read for you.",
        "tags": [
          "Messages"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "messages",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  }
                },
                "required": [
                  "body"
                ]
              },
              "example": {
                "body": "It is, and it fits snugly."
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  }
                },
                "required": [
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "id": "m_2",
                  "from": "you",
                  "by_agent": false,
                  "body": "It is, and it fits snugly.",
                  "created_at": "2026-10-02T17:50:00.000Z"
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/threads/{id}/read": {
      "post": {
        "operationId": "post_threads_id_read",
        "summary": "Mark read",
        "tags": [
          "Messages"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "messages",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "thread",
                  "id": "t_91c…",
                  "with": "Jess",
                  "shop": {
                    "slug": "maya",
                    "name": "Maya's closet"
                  },
                  "listing": {
                    "id": "8d1e6c2a-…",
                    "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                    "photo": "https://files.resell.store/…",
                    "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt"
                  },
                  "preview": "Is the lid included?",
                  "last_from": "them",
                  "unread": false,
                  "needs_you": false,
                  "last_message_at": "2026-10-02T17:42:00.000Z"
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/stats": {
      "get": {
        "operationId": "get_stats",
        "summary": "How your shops are doing",
        "description": "Earnings, views, likes, shares, followers, offers and sales for a period, each compared with the period before. Narrow it to one shop with `shop`. Money is what you made after fees.",
        "tags": [
          "Stats"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "shop",
            "in": "query",
            "required": false,
            "schema": {
              "description": "A shop slug. Leave out for every shop.",
              "type": "string"
            },
            "description": "A shop slug. Leave out for every shop."
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "default": "30d",
              "description": "7d, 30d, 90d or year (since January 1).",
              "type": "string",
              "enum": [
                "7d",
                "30d",
                "90d",
                "year"
              ]
            },
            "description": "7d, 30d, 90d or year (since January 1)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "stats",
                  "period": "7d",
                  "shop": null,
                  "earned": 214,
                  "earned_change": 58,
                  "things_sold": 4,
                  "average_sale": 54,
                  "days_to_sell": 6,
                  "metrics": [
                    {
                      "label": "Views",
                      "value": 398,
                      "note": "61 more than before"
                    },
                    {
                      "label": "Likes",
                      "value": 12,
                      "note": "48 saved right now"
                    },
                    {
                      "label": "Offers",
                      "value": 5,
                      "note": "2 turned into sales"
                    }
                  ],
                  "chart": [
                    {
                      "label": "Mon",
                      "dates": "Sep 26",
                      "earned": 0
                    }
                  ],
                  "sources": [
                    {
                      "label": "Your link",
                      "percent": 44
                    }
                  ],
                  "most_viewed": [
                    {
                      "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                      "views": 61,
                      "note": "12 likes, 1 offer waiting",
                      "url": "https://resell.store/listings/8d1e6c2a-…"
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/webhooks": {
      "get": {
        "operationId": "get_webhooks",
        "summary": "Your webhook",
        "description": "Where we send events, which ones, and how the last delivery went.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "webhooks",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "webhook",
                  "url": "https://example.com/hooks/resell",
                  "events": [
                    "listing.sold",
                    "offer.received"
                  ],
                  "enabled": true,
                  "secret_last4": "9fQa",
                  "last_delivery": {
                    "at": "2026-10-02T18:30:02.000Z",
                    "status": 200,
                    "error": null
                  }
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "put_webhooks",
        "summary": "Set your webhook",
        "description": "Sets the address we POST events to and which events to send. The first time, the response includes the signing `secret`; keep it to check the Resell-Signature header. Events: listing.sold, offer.received, offer.updated, question.asked, order.completed, order.problem, order.refunded, payout.sent, review.created.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "webhooks",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri"
                  },
                  "events": {
                    "description": "Which events to send. Defaults to listing.sold, offer.received and question.asked.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "string"
                      }
                    ]
                  },
                  "enabled": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1",
                          "true",
                          "false",
                          "yes",
                          "no",
                          "on",
                          "off"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "url"
                ]
              },
              "example": {
                "url": "https://example.com/hooks/resell",
                "events": [
                  "listing.sold",
                  "offer.received"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri"
                  },
                  "events": {
                    "description": "Which events to send. Defaults to listing.sold, offer.received and question.asked.",
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "string"
                      }
                    ]
                  },
                  "enabled": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "0",
                          "1",
                          "true",
                          "false",
                          "yes",
                          "no",
                          "on",
                          "off"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "url"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "webhook",
                  "url": "https://example.com/hooks/resell",
                  "events": [
                    "listing.sold",
                    "offer.received"
                  ],
                  "enabled": true,
                  "last_delivery": null,
                  "secret": "whsec_…"
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_webhooks",
        "summary": "Stop webhooks",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "webhooks",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "webhook",
                  "url": null,
                  "events": [],
                  "enabled": false
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/rotate-secret": {
      "post": {
        "operationId": "post_webhooks_rotate_secret",
        "summary": "New signing secret",
        "description": "Makes a new signing secret. The old one stops working at once.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "webhooks",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "webhook",
                  "url": "https://example.com/hooks/resell",
                  "events": [
                    "listing.sold",
                    "offer.received"
                  ],
                  "enabled": true,
                  "last_delivery": {
                    "at": "2026-10-02T18:30:02.000Z",
                    "status": 200,
                    "error": null
                  },
                  "secret": "whsec_…"
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/test": {
      "post": {
        "operationId": "post_webhooks_test",
        "summary": "Send a test event",
        "description": "Sends a `ping` event to your address now and tells you what your server answered.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "webhooks",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "webhook_test",
                  "event": "evt_…",
                  "status": 200,
                  "error": null
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/market/search": {
      "get": {
        "operationId": "get_market_search",
        "summary": "Search the marketplace",
        "description": "Search everything for sale on resell.store, by words and by meaning (\"something to cook stew in\" finds dutch ovens). No key needed. With a key, each result says whether you've liked it.",
        "tags": [
          "Marketplace"
        ],
        "security": [
          {},
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "description": "What you're looking for. Leave out to browse.",
              "type": "string",
              "maxLength": 200
            },
            "description": "What you're looking for. Leave out to browse."
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "description": "One of: Clothing, Shoes, Bags, Home, Collectibles, Books, Tech, Kids, Garden.",
              "type": "string",
              "enum": [
                "Clothing",
                "Shoes",
                "Bags",
                "Home",
                "Collectibles",
                "Books",
                "Tech",
                "Kids",
                "Garden"
              ]
            },
            "description": "One of: Clothing, Shoes, Bags, Home, Collectibles, Books, Tech, Kids, Garden."
          },
          {
            "name": "price",
            "in": "query",
            "required": false,
            "schema": {
              "default": "any",
              "description": "any, under-25, 25-100 or over-100.",
              "type": "string",
              "enum": [
                "any",
                "under-25",
                "25-100",
                "over-100"
              ]
            },
            "description": "any, under-25, 25-100 or over-100."
          },
          {
            "name": "offers",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Only things open to offers.",
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "enum": [
                    "0",
                    "1",
                    "true",
                    "false",
                    "yes",
                    "no",
                    "on",
                    "off"
                  ]
                }
              ]
            },
            "description": "Only things open to offers."
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "description": "best (with a query), newest, price-asc or price-desc.",
              "type": "string",
              "enum": [
                "best",
                "newest",
                "price-asc",
                "price-desc"
              ]
            },
            "description": "best (with a query), newest, price-asc or price-desc."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "description": "How many to skip, for the next page.",
              "type": "integer",
              "minimum": 0,
              "maximum": 100000
            },
            "description": "How many to skip, for the next page."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "search_result",
                  "data": [
                    {
                      "object": "public_listing",
                      "id": "8d1e6c2a-…",
                      "slug": "yellow-le-creuset-dutch-oven-5-5-qt",
                      "store": "maya",
                      "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                      "one_liner": "The good one, barely used, ready for soup season",
                      "price": 185,
                      "shipping": 18,
                      "photo": "https://files.resell.store/…",
                      "category": "Home",
                      "open_to_offers": true,
                      "sold": false,
                      "just_listed": false,
                      "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt",
                      "seller": {
                        "name": "Maya's closet"
                      },
                      "liked": false
                    }
                  ],
                  "total": 3,
                  "stores": 2,
                  "has_more": true
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/market/listings/{id}": {
      "get": {
        "operationId": "get_market_listings_id",
        "summary": "Look at a listing",
        "description": "Everything a buyer sees on a listing's page: photos, the seller's description, details and shipping. No key needed.",
        "tags": [
          "Marketplace"
        ],
        "security": [
          {},
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "public_listing",
                  "id": "8d1e6c2a-…",
                  "slug": "yellow-le-creuset-dutch-oven-5-5-qt",
                  "store": "maya",
                  "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                  "one_liner": "The good one, barely used, ready for soup season",
                  "price": 185,
                  "shipping": 18,
                  "photo": "https://files.resell.store/…",
                  "category": "Home",
                  "open_to_offers": true,
                  "sold": false,
                  "just_listed": false,
                  "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt",
                  "seller": {
                    "name": "Maya's closet"
                  },
                  "liked": false,
                  "description": [
                    "Bought it for a recipe I made twice. No chips, no stains."
                  ],
                  "details": [
                    {
                      "label": "Brand",
                      "value": "Le Creuset"
                    },
                    {
                      "label": "Condition",
                      "value": "Like new"
                    },
                    {
                      "label": "Offers",
                      "value": "Welcome"
                    }
                  ],
                  "photos": [
                    {
                      "url": "https://files.resell.store/…",
                      "video": false
                    }
                  ],
                  "listed": "Listed on September 28."
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/market/stores": {
      "get": {
        "operationId": "get_market_stores",
        "summary": "Browse stores",
        "description": "Every store listed on the marketplace, busiest first. No key needed.",
        "tags": [
          "Marketplace"
        ],
        "security": [
          {},
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "description": "How many to return, 1 to 100. Default 25.",
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "How many to return, 1 to 100. Default 25."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "description": "How many to skip, for the next page.",
              "type": "integer",
              "minimum": 0,
              "maximum": 100000
            },
            "description": "How many to skip, for the next page."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "store",
                      "slug": "maya",
                      "name": "Maya's closet",
                      "owner": "Maya",
                      "tagline": "Clothes and kitchen things I don't use any more",
                      "about": "Clothes and kitchen things I don't use any more. Ships from Portland.",
                      "location": "Portland, OR",
                      "since": "September 2026",
                      "for_sale": 12,
                      "sold": 20,
                      "paused": false,
                      "picture_url": null,
                      "url": "https://maya.resell.store"
                    }
                  ],
                  "total": 1,
                  "has_more": false
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/market/stores/{slug}": {
      "get": {
        "operationId": "get_market_stores_slug",
        "summary": "Look at a store",
        "description": "A store, what's on its shelves and what it's sold lately. No key needed; with one, it says whether you follow it.",
        "tags": [
          "Marketplace"
        ],
        "security": [
          {},
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "store",
                  "slug": "maya",
                  "name": "Maya's closet",
                  "owner": "Maya",
                  "tagline": "Clothes and kitchen things I don't use any more",
                  "about": "Clothes and kitchen things I don't use any more. Ships from Portland.",
                  "location": "Portland, OR",
                  "since": "September 2026",
                  "for_sale": 12,
                  "sold": 20,
                  "paused": false,
                  "picture_url": null,
                  "url": "https://maya.resell.store",
                  "followers": 105,
                  "following": false,
                  "listings": [
                    {
                      "object": "public_listing",
                      "id": "8d1e6c2a-…",
                      "slug": "yellow-le-creuset-dutch-oven-5-5-qt",
                      "store": "maya",
                      "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                      "one_liner": "The good one, barely used, ready for soup season",
                      "price": 185,
                      "shipping": 18,
                      "photo": "https://files.resell.store/…",
                      "category": "Home",
                      "open_to_offers": true,
                      "sold": false,
                      "just_listed": false,
                      "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt",
                      "seller": {
                        "name": "Maya's closet"
                      },
                      "liked": false
                    }
                  ],
                  "recently_sold": [
                    {
                      "title": "Linen wrap dress",
                      "price": 24,
                      "when": "last week"
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/market/listings/{id}/like": {
      "put": {
        "operationId": "put_market_listings_id_like",
        "summary": "Like a listing",
        "description": "Saves it to your likes (the heart). Doing it twice is fine.",
        "tags": [
          "Likes and follows"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "buying",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "like",
                  "listing": "8d1e6c2a-…",
                  "liked": true
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_market_listings_id_like",
        "summary": "Unlike a listing",
        "tags": [
          "Likes and follows"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "buying",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "like",
                  "listing": "8d1e6c2a-…",
                  "liked": false
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/likes": {
      "get": {
        "operationId": "get_likes",
        "summary": "Your likes",
        "description": "Everything you've liked: still for sale first, then sold.",
        "tags": [
          "Likes and follows"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "description": "How many to return, 1 to 100. Default 25.",
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "How many to return, 1 to 100. Default 25."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "description": "How many to skip, for the next page.",
              "type": "integer",
              "minimum": 0,
              "maximum": 100000
            },
            "description": "How many to skip, for the next page."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "public_listing",
                      "id": "8d1e6c2a-…",
                      "slug": "yellow-le-creuset-dutch-oven-5-5-qt",
                      "store": "maya",
                      "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                      "one_liner": "The good one, barely used, ready for soup season",
                      "price": 185,
                      "shipping": 18,
                      "photo": "https://files.resell.store/…",
                      "category": "Home",
                      "open_to_offers": true,
                      "sold": false,
                      "just_listed": false,
                      "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt",
                      "seller": {
                        "name": "Maya's closet"
                      },
                      "liked": true
                    }
                  ],
                  "total": 1,
                  "has_more": false
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/market/stores/{slug}/follow": {
      "put": {
        "operationId": "put_market_stores_slug_follow",
        "summary": "Follow a store",
        "description": "New things from stores you follow show on your Home.",
        "tags": [
          "Likes and follows"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "buying",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "follow",
                  "store": "maya",
                  "following": true
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_market_stores_slug_follow",
        "summary": "Unfollow a store",
        "tags": [
          "Likes and follows"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "buying",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "follow",
                  "store": "maya",
                  "following": false
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/following": {
      "get": {
        "operationId": "get_following",
        "summary": "Stores you follow",
        "description": "Most recently followed first, each with its newest few listings.",
        "tags": [
          "Likes and follows"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "description": "How many to return, 1 to 100. Default 25.",
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "How many to return, 1 to 100. Default 25."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "description": "How many to skip, for the next page.",
              "type": "integer",
              "minimum": 0,
              "maximum": 100000
            },
            "description": "How many to skip, for the next page."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "followed_store",
                      "slug": "maya",
                      "name": "Maya's closet",
                      "for_sale": 12,
                      "has_new": true,
                      "newest": [
                        {
                          "id": "8d1e…",
                          "title": "Yellow Le Creuset dutch oven, 5.5 qt",
                          "price": 185,
                          "url": "https://maya.resell.store/…"
                        }
                      ]
                    }
                  ],
                  "total": 1,
                  "has_more": false
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/market/listings/{id}/share": {
      "post": {
        "operationId": "post_market_listings_id_share",
        "summary": "Share a listing",
        "description": "Gives you the listing's link to share, tagged with where it's going (so the seller's stats can tell), and counts the share.",
        "tags": [
          "Likes and follows"
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "x-scope": "buying",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "channel": {
                    "description": "Where it's going: ig, fb, whatsapp, tiktok, pinterest, x, sms, email… Optional.",
                    "type": "string",
                    "maxLength": 30
                  }
                }
              },
              "example": {
                "channel": "whatsapp"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "channel": {
                    "description": "Where it's going: ig, fb, whatsapp, tiktok, pinterest, x, sms, email… Optional.",
                    "type": "string",
                    "maxLength": 30
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "object": "share",
                  "listing": "8d1e6c2a-…",
                  "url": "https://maya.resell.store/yellow-le-creuset-dutch-oven-5-5-qt?ref=whatsapp",
                  "text": "Yellow Le Creuset dutch oven, 5.5 qt, $185 at Maya's closet"
                }
              }
            }
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "get_openapi_json",
        "summary": "OpenAPI description",
        "description": "This API as an OpenAPI 3.1 document, for code generators and API tools.",
        "tags": [
          "Account"
        ],
        "security": [
          {},
          {
            "bearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "default": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "param": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}