{
  "info": {
    "title": "Arcade API",
    "version": "1",
    "description": "Generate patterns and custom products from text prompts, and order them. Every request is a POST with a JSON body."
  },
  "servers": [
    {
      "url": "https://staging-platform.arcade.ai/v1",
      "description": "Staging"
    }
  ],
  "tags": [
    {
      "name": "Patterns",
      "description": "Reusable print patterns you generate or upload."
    },
    {
      "name": "Refine",
      "description": "Edit, recolor, crop and extend patterns."
    },
    {
      "name": "Jobs",
      "description": "Long-running work."
    },
    {
      "name": "References",
      "description": "Images that guide generation."
    },
    {
      "name": "Models",
      "description": "The models that generate patterns."
    },
    {
      "name": "Categories",
      "description": "Product types and their options."
    },
    {
      "name": "Products",
      "description": "Products generated from a prompt or made from your patterns."
    },
    {
      "name": "Pricing",
      "description": "Your seller pricing rules and previews."
    },
    {
      "name": "Checkouts",
      "description": "Checkouts for ordering products."
    },
    {
      "name": "Orders",
      "description": "Your orders."
    },
    {
      "name": "Feedback",
      "description": "Reports about the API to Arcade."
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API key from Settings → API keys in Arcade Studio."
      }
    }
  },
  "security": [
    {
      "apiKey": []
    }
  ],
  "openapi": "3.1.1",
  "paths": {
    "/patterns/create": {
      "post": {
        "operationId": "patterns.create",
        "summary": "Create a pattern",
        "description": "Starts a job that generates a reusable print pattern from a prompt. When the job succeeds, `result.patternId` is the new pattern. Refine it, or make products from it with `products/create`. To make a product straight from a prompt, use `products/generate`.",
        "tags": [
          "Patterns"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "An ID you choose for this request, up to 128 characters. Retrying with the same `requestId` and body returns the original result."
                  },
                  "prompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000,
                    "description": "What the pattern should show, up to 1000 characters."
                  },
                  "referenceIds": {
                    "type": "array",
                    "maxItems": 3,
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The reference image's ID."
                    },
                    "default": [],
                    "description": "Reference images to guide the generation."
                  },
                  "modelId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The model to generate with, from `models/list`. Omit it to let Arcade choose."
                  },
                  "colors": {
                    "type": "array",
                    "maxItems": 10,
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "default": [],
                    "description": "Colors to use. Each is a `#RRGGBB` hex value, or an Arcade palette or Pantone color token."
                  }
                },
                "required": [
                  "requestId",
                  "prompt"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobId": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The job's ID. Pass it to `jobs/get`."
                    },
                    "kind": {
                      "enum": [
                        "pattern",
                        "product",
                        "download"
                      ],
                      "type": "string",
                      "description": "What the job makes. `pattern`: started by `patterns/create` or a refine that returns a job. `product`: started by `products/create` or `products/generate`. `download`: started by an upscale in Arcade Studio."
                    },
                    "status": {
                      "enum": [
                        "running",
                        "succeeded",
                        "failed"
                      ],
                      "type": "string",
                      "description": "A job starts as `running` and ends as `succeeded` or `failed`."
                    },
                    "result": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "patternId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque ID of one pattern: an immutable image. A refine makes a new pattern."
                                }
                              },
                              "required": [
                                "patternId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "productId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque product ID"
                                }
                              },
                              "required": [
                                "productId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "downloadUrl": {
                                  "type": "string",
                                  "format": "uri",
                                  "description": "Short-lived; read the job again to renew"
                                },
                                "expiresAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "The URL works at least until this time"
                                }
                              },
                              "required": [
                                "downloadUrl",
                                "expiresAt"
                              ]
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "What the job made, once it succeeded. Null while the job is running and when it failed. Also null on a succeeded job when a deformity fix found nothing to repair, or when the pattern has since been deleted."
                    },
                    "error": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "message": {
                              "type": "string",
                              "description": "What went wrong."
                            },
                            "reason": {
                              "const": "insufficient_credits",
                              "description": "Present when the job failed because the account ran out of credits. Add credits or a plan, then send the request again with a new `requestId`."
                            }
                          },
                          "required": [
                            "message"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why the job failed. Null unless the job failed."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the job started. For a product whose build was not recorded, when the product was created."
                    },
                    "completedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When the job finished. Null while the job is running, and for a failed product job."
                    }
                  },
                  "required": [
                    "jobId",
                    "kind",
                    "status",
                    "result",
                    "error",
                    "createdAt",
                    "completedAt"
                  ],
                  "description": "A pattern job that makes one pattern"
                }
              }
            }
          }
        }
      }
    },
    "/patterns/createUpload": {
      "post": {
        "operationId": "patterns.createUpload",
        "summary": "Create a pattern upload URL",
        "description": "Returns a signed URL for uploading your own artwork. `PUT` the file to the URL with the required headers, then call `patterns/upload`. Supports JPEG, PNG, WebP and GIF, up to 10 MiB.",
        "tags": [
          "Patterns"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "An ID you choose for this request, up to 128 characters. Retrying with the same `requestId` and body returns the original result."
                  },
                  "mediaType": {
                    "enum": [
                      "image/gif",
                      "image/jpeg",
                      "image/png",
                      "image/webp"
                    ],
                    "type": "string",
                    "description": "The file's media type, such as `image/png`."
                  },
                  "byteLength": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 10485760,
                    "exclusiveMinimum": 0,
                    "description": "The file's size in bytes, at most 10 MiB. `patterns/upload` checks the size of the file you sent."
                  }
                },
                "required": [
                  "requestId",
                  "mediaType",
                  "byteLength"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uploadId": {
                      "type": "string",
                      "pattern": "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\\.(gif|jpg|png|webp)$",
                      "description": "The upload's ID. Only the account that created it can use it."
                    },
                    "uploadUrl": {
                      "type": "string",
                      "format": "uri",
                      "description": "Signed URL to `PUT` the file to. The host can change."
                    },
                    "method": {
                      "const": "PUT"
                    },
                    "requiredHeaders": {
                      "type": "object",
                      "properties": {
                        "Content-Type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "Content-Type"
                      ],
                      "description": "Headers the `PUT` must send, exactly as given."
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the upload URL stops working."
                    }
                  },
                  "required": [
                    "uploadId",
                    "uploadUrl",
                    "method",
                    "requiredHeaders",
                    "expiresAt"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/patterns/upload": {
      "post": {
        "operationId": "patterns.upload",
        "summary": "Upload a pattern",
        "description": "Saves a file you uploaded as a pattern. Nothing is generated: the response is the pattern itself, not a job, with a null `prompt` and `sourcePatternId`. Pass its `patternId` to `products/create` to make a print product. Calling again with the same `uploadId` returns the same pattern.",
        "tags": [
          "Patterns"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "An ID you choose for this request, up to 128 characters. Retrying with the same `requestId` and body returns the original result."
                  },
                  "uploadId": {
                    "type": "string",
                    "pattern": "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\\.(gif|jpg|png|webp)$",
                    "description": "The `uploadId` from `patterns/createUpload`, after you have sent the file."
                  }
                },
                "required": [
                  "requestId",
                  "uploadId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "repeatDrop": {
                      "enum": [
                        "none",
                        "half",
                        "quarter",
                        "eighth"
                      ],
                      "type": "string",
                      "description": "How the pattern repeats. Each column of tiles is shifted down from the one before it by this fraction of the tile height: `none`, `half`, `quarter` or `eighth`. The tile itself stays square."
                    },
                    "imageUrl": {
                      "type": "string",
                      "format": "uri",
                      "description": "URL of the image. It expires; call the endpoint again for a fresh one. The host can change."
                    },
                    "thumbnailUrl": {
                      "type": "string",
                      "format": "uri",
                      "description": "URL of a small version of the image. It expires like `imageUrl`."
                    },
                    "width": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991,
                      "exclusiveMinimum": 0,
                      "description": "Width of the image in pixels."
                    },
                    "height": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991,
                      "exclusiveMinimum": 0,
                      "description": "Height of the image in pixels."
                    },
                    "patternId": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The pattern's ID. A pattern never changes: a refine makes a new pattern with a new ID."
                    },
                    "prompt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The prompt the pattern was generated from. A refined pattern keeps the prompt of its original. Null for uploaded artwork."
                    },
                    "sourcePatternId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "description": "The pattern's ID. A pattern never changes: a refine makes a new pattern with a new ID."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "For a refined pattern, the pattern it was made from. Null for a generated or uploaded pattern."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the pattern was made."
                    }
                  },
                  "required": [
                    "imageUrl",
                    "thumbnailUrl",
                    "width",
                    "height",
                    "patternId",
                    "prompt",
                    "sourcePatternId",
                    "createdAt"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/patterns/get": {
      "post": {
        "operationId": "patterns.get",
        "summary": "Retrieve a pattern",
        "description": "Retrieves a pattern. Image URLs expire; retrieve the pattern again for fresh ones. A jewelry product's image is not a pattern and returns `400`; read it with `products/get`.",
        "tags": [
          "Patterns"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "patternId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The pattern's ID. A pattern never changes: a refine makes a new pattern with a new ID."
                  }
                },
                "required": [
                  "patternId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "repeatDrop": {
                      "enum": [
                        "none",
                        "half",
                        "quarter",
                        "eighth"
                      ],
                      "type": "string",
                      "description": "How the pattern repeats. Each column of tiles is shifted down from the one before it by this fraction of the tile height: `none`, `half`, `quarter` or `eighth`. The tile itself stays square."
                    },
                    "imageUrl": {
                      "type": "string",
                      "format": "uri",
                      "description": "URL of the image. It expires; call the endpoint again for a fresh one. The host can change."
                    },
                    "thumbnailUrl": {
                      "type": "string",
                      "format": "uri",
                      "description": "URL of a small version of the image. It expires like `imageUrl`."
                    },
                    "width": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991,
                      "exclusiveMinimum": 0,
                      "description": "Width of the image in pixels."
                    },
                    "height": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991,
                      "exclusiveMinimum": 0,
                      "description": "Height of the image in pixels."
                    },
                    "patternId": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The pattern's ID. A pattern never changes: a refine makes a new pattern with a new ID."
                    },
                    "prompt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The prompt the pattern was generated from. A refined pattern keeps the prompt of its original. Null for uploaded artwork."
                    },
                    "sourcePatternId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "description": "The pattern's ID. A pattern never changes: a refine makes a new pattern with a new ID."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "For a refined pattern, the pattern it was made from. Null for a generated or uploaded pattern."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the pattern was made."
                    }
                  },
                  "required": [
                    "imageUrl",
                    "thumbnailUrl",
                    "width",
                    "height",
                    "patternId",
                    "prompt",
                    "sourcePatternId",
                    "createdAt"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/patterns/list": {
      "post": {
        "operationId": "patterns.list",
        "summary": "List patterns",
        "description": "Lists your patterns, newest first. Jewelry product images are not patterns and are not listed; use `products/list` for those.",
        "tags": [
          "Patterns"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cursor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The `nextCursor` from the previous page. Omit it for the first page."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 60,
                    "default": 24,
                    "description": "How many results to return per page."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "repeatDrop": {
                            "enum": [
                              "none",
                              "half",
                              "quarter",
                              "eighth"
                            ],
                            "type": "string",
                            "description": "How the pattern repeats. Each column of tiles is shifted down from the one before it by this fraction of the tile height: `none`, `half`, `quarter` or `eighth`. The tile itself stays square."
                          },
                          "imageUrl": {
                            "type": "string",
                            "format": "uri",
                            "description": "URL of the image. It expires; call the endpoint again for a fresh one. The host can change."
                          },
                          "thumbnailUrl": {
                            "type": "string",
                            "format": "uri",
                            "description": "URL of a small version of the image. It expires like `imageUrl`."
                          },
                          "width": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991,
                            "exclusiveMinimum": 0,
                            "description": "Width of the image in pixels."
                          },
                          "height": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991,
                            "exclusiveMinimum": 0,
                            "description": "Height of the image in pixels."
                          },
                          "patternId": {
                            "type": "string",
                            "minLength": 1,
                            "description": "The pattern's ID. A pattern never changes: a refine makes a new pattern with a new ID."
                          },
                          "prompt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The prompt the pattern was generated from. A refined pattern keeps the prompt of its original. Null for uploaded artwork."
                          },
                          "sourcePatternId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "description": "The pattern's ID. A pattern never changes: a refine makes a new pattern with a new ID."
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "For a refined pattern, the pattern it was made from. Null for a generated or uploaded pattern."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the pattern was made."
                          }
                        },
                        "required": [
                          "imageUrl",
                          "thumbnailUrl",
                          "width",
                          "height",
                          "patternId",
                          "prompt",
                          "sourcePatternId",
                          "createdAt"
                        ]
                      },
                      "description": "Your patterns, whether generated, uploaded or refined, newest first."
                    },
                    "nextCursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Pass this as `cursor` to get the next page. Null on the last page."
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/patterns/refine/edit": {
      "post": {
        "operationId": "patterns.refine.edit",
        "summary": "Edit a pattern",
        "description": "Starts a job that edits a pattern from a text instruction.",
        "tags": [
          "Refine"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "An ID you choose for this request, up to 128 characters. Retrying with the same `requestId` and body returns the original result."
                  },
                  "patternId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The pattern to refine; not a jewelry product image"
                  },
                  "instruction": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000,
                    "description": "The change to make, in plain words, up to 1000 characters."
                  },
                  "referenceId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "A reference or another pattern to guide the edit; not a jewelry product image"
                  },
                  "colors": {
                    "type": "array",
                    "maxItems": 10,
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "description": "Colors to use. Each is a `#RRGGBB` hex value, or an Arcade palette or Pantone color token."
                  }
                },
                "required": [
                  "requestId",
                  "patternId",
                  "instruction"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobId": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The job's ID. Pass it to `jobs/get`."
                    },
                    "kind": {
                      "enum": [
                        "pattern",
                        "product",
                        "download"
                      ],
                      "type": "string",
                      "description": "What the job makes. `pattern`: started by `patterns/create` or a refine that returns a job. `product`: started by `products/create` or `products/generate`. `download`: started by an upscale in Arcade Studio."
                    },
                    "status": {
                      "enum": [
                        "running",
                        "succeeded",
                        "failed"
                      ],
                      "type": "string",
                      "description": "A job starts as `running` and ends as `succeeded` or `failed`."
                    },
                    "result": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "patternId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque ID of one pattern: an immutable image. A refine makes a new pattern."
                                }
                              },
                              "required": [
                                "patternId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "productId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque product ID"
                                }
                              },
                              "required": [
                                "productId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "downloadUrl": {
                                  "type": "string",
                                  "format": "uri",
                                  "description": "Short-lived; read the job again to renew"
                                },
                                "expiresAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "The URL works at least until this time"
                                }
                              },
                              "required": [
                                "downloadUrl",
                                "expiresAt"
                              ]
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "What the job made, once it succeeded. Null while the job is running and when it failed. Also null on a succeeded job when a deformity fix found nothing to repair, or when the pattern has since been deleted."
                    },
                    "error": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "message": {
                              "type": "string",
                              "description": "What went wrong."
                            },
                            "reason": {
                              "const": "insufficient_credits",
                              "description": "Present when the job failed because the account ran out of credits. Add credits or a plan, then send the request again with a new `requestId`."
                            }
                          },
                          "required": [
                            "message"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why the job failed. Null unless the job failed."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the job started. For a product whose build was not recorded, when the product was created."
                    },
                    "completedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When the job finished. Null while the job is running, and for a failed product job."
                    }
                  },
                  "required": [
                    "jobId",
                    "kind",
                    "status",
                    "result",
                    "error",
                    "createdAt",
                    "completedAt"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/patterns/refine/editRegion": {
      "post": {
        "operationId": "patterns.refine.editRegion",
        "summary": "Edit a region",
        "description": "Starts a job that edits only the masked area of a pattern.",
        "tags": [
          "Refine"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "An ID you choose for this request, up to 128 characters. Retrying with the same `requestId` and body returns the original result."
                  },
                  "patternId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The pattern to refine; not a jewelry product image"
                  },
                  "instruction": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000,
                    "description": "The change to make, in plain words, up to 1000 characters."
                  },
                  "mask": {
                    "type": "string",
                    "minLength": 1,
                    "description": "A PNG data URL that marks the area to edit. Pixels with alpha above 0 are editable. The mask must have the pattern's aspect ratio (the short side may differ by 1 pixel) and a long edge of at most 1536 pixels. It is scaled to the size the edit runs at, and the editable area must cover at least 16 x 16 pixels at that size."
                  }
                },
                "required": [
                  "requestId",
                  "patternId",
                  "instruction",
                  "mask"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobId": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The job's ID. Pass it to `jobs/get`."
                    },
                    "kind": {
                      "enum": [
                        "pattern",
                        "product",
                        "download"
                      ],
                      "type": "string",
                      "description": "What the job makes. `pattern`: started by `patterns/create` or a refine that returns a job. `product`: started by `products/create` or `products/generate`. `download`: started by an upscale in Arcade Studio."
                    },
                    "status": {
                      "enum": [
                        "running",
                        "succeeded",
                        "failed"
                      ],
                      "type": "string",
                      "description": "A job starts as `running` and ends as `succeeded` or `failed`."
                    },
                    "result": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "patternId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque ID of one pattern: an immutable image. A refine makes a new pattern."
                                }
                              },
                              "required": [
                                "patternId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "productId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque product ID"
                                }
                              },
                              "required": [
                                "productId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "downloadUrl": {
                                  "type": "string",
                                  "format": "uri",
                                  "description": "Short-lived; read the job again to renew"
                                },
                                "expiresAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "The URL works at least until this time"
                                }
                              },
                              "required": [
                                "downloadUrl",
                                "expiresAt"
                              ]
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "What the job made, once it succeeded. Null while the job is running and when it failed. Also null on a succeeded job when a deformity fix found nothing to repair, or when the pattern has since been deleted."
                    },
                    "error": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "message": {
                              "type": "string",
                              "description": "What went wrong."
                            },
                            "reason": {
                              "const": "insufficient_credits",
                              "description": "Present when the job failed because the account ran out of credits. Add credits or a plan, then send the request again with a new `requestId`."
                            }
                          },
                          "required": [
                            "message"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why the job failed. Null unless the job failed."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the job started. For a product whose build was not recorded, when the product was created."
                    },
                    "completedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When the job finished. Null while the job is running, and for a failed product job."
                    }
                  },
                  "required": [
                    "jobId",
                    "kind",
                    "status",
                    "result",
                    "error",
                    "createdAt",
                    "completedAt"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/patterns/refine/recolorClusters": {
      "post": {
        "operationId": "patterns.refine.recolorClusters",
        "summary": "Retrieve color clusters",
        "description": "Lists a pattern's main colors as clusters. Send each cluster to `recolor` with the color you want. Returns the clusters directly, not a job.",
        "tags": [
          "Refine"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "An ID you choose for this request, up to 128 characters. Retrying with the same `requestId` and body returns the original result."
                  },
                  "patternId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The pattern to recolor; not a jewelry product image"
                  },
                  "clusterCount": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20,
                    "description": "Most colors to detect; values above 16 detect 16. Omit to let the service choose; recolor must repeat the value"
                  }
                },
                "required": [
                  "requestId",
                  "patternId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "clusters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "clusterId": {
                            "type": "string",
                            "description": "The cluster's ID. Send it to `recolor` with the color you want."
                          },
                          "color": {
                            "type": "string",
                            "pattern": "^#[0-9a-fA-F]{6}$",
                            "description": "The cluster’s current color"
                          }
                        },
                        "required": [
                          "clusterId",
                          "color"
                        ]
                      }
                    }
                  },
                  "required": [
                    "clusters"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/patterns/refine/recolor": {
      "post": {
        "operationId": "patterns.refine.recolor",
        "summary": "Recolor a pattern",
        "description": "Starts a job that replaces a pattern's dominant colors.",
        "tags": [
          "Refine"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "An ID you choose for this request, up to 128 characters. Retrying with the same `requestId` and body returns the original result."
                  },
                  "patternId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The pattern to refine; not a jewelry product image"
                  },
                  "colors": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "object",
                      "properties": {
                        "clusterId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "color": {
                          "type": "string",
                          "pattern": "^#[0-9a-fA-F]{6}$",
                          "description": "#RRGGBB"
                        }
                      },
                      "required": [
                        "clusterId",
                        "color"
                      ]
                    },
                    "description": "One entry for every cluster that `recolorClusters` returned. At least one color must differ from the cluster's current color."
                  },
                  "clusterCount": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20,
                    "description": "Most colors to detect; values above 16 detect 16. Omit to let the service choose; recolor must repeat the value"
                  }
                },
                "required": [
                  "requestId",
                  "patternId",
                  "colors"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobId": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The job's ID. Pass it to `jobs/get`."
                    },
                    "kind": {
                      "enum": [
                        "pattern",
                        "product",
                        "download"
                      ],
                      "type": "string",
                      "description": "What the job makes. `pattern`: started by `patterns/create` or a refine that returns a job. `product`: started by `products/create` or `products/generate`. `download`: started by an upscale in Arcade Studio."
                    },
                    "status": {
                      "enum": [
                        "running",
                        "succeeded",
                        "failed"
                      ],
                      "type": "string",
                      "description": "A job starts as `running` and ends as `succeeded` or `failed`."
                    },
                    "result": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "patternId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque ID of one pattern: an immutable image. A refine makes a new pattern."
                                }
                              },
                              "required": [
                                "patternId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "productId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque product ID"
                                }
                              },
                              "required": [
                                "productId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "downloadUrl": {
                                  "type": "string",
                                  "format": "uri",
                                  "description": "Short-lived; read the job again to renew"
                                },
                                "expiresAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "The URL works at least until this time"
                                }
                              },
                              "required": [
                                "downloadUrl",
                                "expiresAt"
                              ]
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "What the job made, once it succeeded. Null while the job is running and when it failed. Also null on a succeeded job when a deformity fix found nothing to repair, or when the pattern has since been deleted."
                    },
                    "error": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "message": {
                              "type": "string",
                              "description": "What went wrong."
                            },
                            "reason": {
                              "const": "insufficient_credits",
                              "description": "Present when the job failed because the account ran out of credits. Add credits or a plan, then send the request again with a new `requestId`."
                            }
                          },
                          "required": [
                            "message"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why the job failed. Null unless the job failed."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the job started. For a product whose build was not recorded, when the product was created."
                    },
                    "completedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When the job finished. Null while the job is running, and for a failed product job."
                    }
                  },
                  "required": [
                    "jobId",
                    "kind",
                    "status",
                    "result",
                    "error",
                    "createdAt",
                    "completedAt"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/patterns/refine/crop": {
      "post": {
        "operationId": "patterns.refine.crop",
        "summary": "Crop a pattern",
        "description": "Starts a job that crops a pattern to a rectangle.",
        "tags": [
          "Refine"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "An ID you choose for this request, up to 128 characters. Retrying with the same `requestId` and body returns the original result."
                  },
                  "patternId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The pattern to refine; not a jewelry product image"
                  },
                  "rectangle": {
                    "type": "object",
                    "properties": {
                      "left": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991,
                        "description": "Distance from the left edge."
                      },
                      "top": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991,
                        "description": "Distance from the top edge."
                      },
                      "width": {
                        "type": "integer",
                        "minimum": 16,
                        "maximum": 9007199254740991,
                        "description": "Width of the area."
                      },
                      "height": {
                        "type": "integer",
                        "minimum": 16,
                        "maximum": 9007199254740991,
                        "description": "Height of the area."
                      }
                    },
                    "required": [
                      "left",
                      "top",
                      "width",
                      "height"
                    ],
                    "description": "The area to keep, in the pattern's pixels."
                  }
                },
                "required": [
                  "requestId",
                  "patternId",
                  "rectangle"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobId": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The job's ID. Pass it to `jobs/get`."
                    },
                    "kind": {
                      "enum": [
                        "pattern",
                        "product",
                        "download"
                      ],
                      "type": "string",
                      "description": "What the job makes. `pattern`: started by `patterns/create` or a refine that returns a job. `product`: started by `products/create` or `products/generate`. `download`: started by an upscale in Arcade Studio."
                    },
                    "status": {
                      "enum": [
                        "running",
                        "succeeded",
                        "failed"
                      ],
                      "type": "string",
                      "description": "A job starts as `running` and ends as `succeeded` or `failed`."
                    },
                    "result": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "patternId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque ID of one pattern: an immutable image. A refine makes a new pattern."
                                }
                              },
                              "required": [
                                "patternId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "productId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque product ID"
                                }
                              },
                              "required": [
                                "productId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "downloadUrl": {
                                  "type": "string",
                                  "format": "uri",
                                  "description": "Short-lived; read the job again to renew"
                                },
                                "expiresAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "The URL works at least until this time"
                                }
                              },
                              "required": [
                                "downloadUrl",
                                "expiresAt"
                              ]
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "What the job made, once it succeeded. Null while the job is running and when it failed. Also null on a succeeded job when a deformity fix found nothing to repair, or when the pattern has since been deleted."
                    },
                    "error": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "message": {
                              "type": "string",
                              "description": "What went wrong."
                            },
                            "reason": {
                              "const": "insufficient_credits",
                              "description": "Present when the job failed because the account ran out of credits. Add credits or a plan, then send the request again with a new `requestId`."
                            }
                          },
                          "required": [
                            "message"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why the job failed. Null unless the job failed."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the job started. For a product whose build was not recorded, when the product was created."
                    },
                    "completedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When the job finished. Null while the job is running, and for a failed product job."
                    }
                  },
                  "required": [
                    "jobId",
                    "kind",
                    "status",
                    "result",
                    "error",
                    "createdAt",
                    "completedAt"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/patterns/refine/makeSeamless": {
      "post": {
        "operationId": "patterns.refine.makeSeamless",
        "summary": "Make a pattern seamless",
        "description": "Starts a job that turns a square area of a pattern into a tile that repeats without visible seams. Set `drop` to shift each column of tiles down by a half, quarter or eighth of the tile height. Quarter and eighth drops are not available on every account; where they are not, the request returns `403`.",
        "tags": [
          "Refine"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "An ID you choose for this request, up to 128 characters. Retrying with the same `requestId` and body returns the original result."
                  },
                  "patternId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The pattern to refine; not a jewelry product image"
                  },
                  "tile": {
                    "type": "object",
                    "properties": {
                      "left": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991,
                        "description": "Distance from the left edge."
                      },
                      "top": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991,
                        "description": "Distance from the top edge."
                      },
                      "size": {
                        "type": "integer",
                        "minimum": 16,
                        "maximum": 9007199254740991,
                        "description": "Width and height of the square."
                      }
                    },
                    "required": [
                      "left",
                      "top",
                      "size"
                    ],
                    "description": "The square area to turn into a repeating tile, in the pattern's pixels."
                  },
                  "drop": {
                    "enum": [
                      "none",
                      "half",
                      "quarter",
                      "eighth"
                    ],
                    "type": "string",
                    "description": "How the pattern repeats. Each column of tiles is shifted down from the one before it by this fraction of the tile height: `none`, `half`, `quarter` or `eighth`. The tile itself stays square."
                  }
                },
                "required": [
                  "requestId",
                  "patternId",
                  "tile"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobId": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The job's ID. Pass it to `jobs/get`."
                    },
                    "kind": {
                      "enum": [
                        "pattern",
                        "product",
                        "download"
                      ],
                      "type": "string",
                      "description": "What the job makes. `pattern`: started by `patterns/create` or a refine that returns a job. `product`: started by `products/create` or `products/generate`. `download`: started by an upscale in Arcade Studio."
                    },
                    "status": {
                      "enum": [
                        "running",
                        "succeeded",
                        "failed"
                      ],
                      "type": "string",
                      "description": "A job starts as `running` and ends as `succeeded` or `failed`."
                    },
                    "result": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "patternId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque ID of one pattern: an immutable image. A refine makes a new pattern."
                                }
                              },
                              "required": [
                                "patternId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "productId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque product ID"
                                }
                              },
                              "required": [
                                "productId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "downloadUrl": {
                                  "type": "string",
                                  "format": "uri",
                                  "description": "Short-lived; read the job again to renew"
                                },
                                "expiresAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "The URL works at least until this time"
                                }
                              },
                              "required": [
                                "downloadUrl",
                                "expiresAt"
                              ]
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "What the job made, once it succeeded. Null while the job is running and when it failed. Also null on a succeeded job when a deformity fix found nothing to repair, or when the pattern has since been deleted."
                    },
                    "error": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "message": {
                              "type": "string",
                              "description": "What went wrong."
                            },
                            "reason": {
                              "const": "insufficient_credits",
                              "description": "Present when the job failed because the account ran out of credits. Add credits or a plan, then send the request again with a new `requestId`."
                            }
                          },
                          "required": [
                            "message"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why the job failed. Null unless the job failed."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the job started. For a product whose build was not recorded, when the product was created."
                    },
                    "completedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When the job finished. Null while the job is running, and for a failed product job."
                    }
                  },
                  "required": [
                    "jobId",
                    "kind",
                    "status",
                    "result",
                    "error",
                    "createdAt",
                    "completedAt"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/patterns/refine/extendPattern": {
      "post": {
        "operationId": "patterns.refine.extendPattern",
        "summary": "Extend a pattern",
        "description": "Starts a job that extends a repeating pattern to a larger size.",
        "tags": [
          "Refine"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "targetHeight": {
                    "type": "integer",
                    "minimum": 16,
                    "maximum": 1536,
                    "description": "The height to extend to, in pixels."
                  },
                  "targetWidth": {
                    "type": "integer",
                    "minimum": 16,
                    "maximum": 1536,
                    "description": "The width to extend to, in pixels. The aspect ratio cannot exceed 5:1."
                  },
                  "requestId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "An ID you choose for this request, up to 128 characters. Retrying with the same `requestId` and body returns the original result."
                  },
                  "patternId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The pattern to refine; not a jewelry product image"
                  }
                },
                "required": [
                  "targetHeight",
                  "targetWidth",
                  "requestId",
                  "patternId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobId": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The job's ID. Pass it to `jobs/get`."
                    },
                    "kind": {
                      "enum": [
                        "pattern",
                        "product",
                        "download"
                      ],
                      "type": "string",
                      "description": "What the job makes. `pattern`: started by `patterns/create` or a refine that returns a job. `product`: started by `products/create` or `products/generate`. `download`: started by an upscale in Arcade Studio."
                    },
                    "status": {
                      "enum": [
                        "running",
                        "succeeded",
                        "failed"
                      ],
                      "type": "string",
                      "description": "A job starts as `running` and ends as `succeeded` or `failed`."
                    },
                    "result": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "patternId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque ID of one pattern: an immutable image. A refine makes a new pattern."
                                }
                              },
                              "required": [
                                "patternId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "productId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque product ID"
                                }
                              },
                              "required": [
                                "productId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "downloadUrl": {
                                  "type": "string",
                                  "format": "uri",
                                  "description": "Short-lived; read the job again to renew"
                                },
                                "expiresAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "The URL works at least until this time"
                                }
                              },
                              "required": [
                                "downloadUrl",
                                "expiresAt"
                              ]
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "What the job made, once it succeeded. Null while the job is running and when it failed. Also null on a succeeded job when a deformity fix found nothing to repair, or when the pattern has since been deleted."
                    },
                    "error": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "message": {
                              "type": "string",
                              "description": "What went wrong."
                            },
                            "reason": {
                              "const": "insufficient_credits",
                              "description": "Present when the job failed because the account ran out of credits. Add credits or a plan, then send the request again with a new `requestId`."
                            }
                          },
                          "required": [
                            "message"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why the job failed. Null unless the job failed."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the job started. For a product whose build was not recorded, when the product was created."
                    },
                    "completedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When the job finished. Null while the job is running, and for a failed product job."
                    }
                  },
                  "required": [
                    "jobId",
                    "kind",
                    "status",
                    "result",
                    "error",
                    "createdAt",
                    "completedAt"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/patterns/refine/extendScene": {
      "post": {
        "operationId": "patterns.refine.extendScene",
        "summary": "Extend a scene",
        "description": "Starts a job that extends a non-repeating image beyond its edges.",
        "tags": [
          "Refine"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "targetHeight": {
                    "type": "integer",
                    "minimum": 16,
                    "maximum": 1536,
                    "description": "The height to extend to, in pixels."
                  },
                  "targetWidth": {
                    "type": "integer",
                    "minimum": 16,
                    "maximum": 1536,
                    "description": "The width to extend to, in pixels. The aspect ratio cannot exceed 5:1."
                  },
                  "requestId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "An ID you choose for this request, up to 128 characters. Retrying with the same `requestId` and body returns the original result."
                  },
                  "patternId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The pattern to refine; not a jewelry product image"
                  }
                },
                "required": [
                  "targetHeight",
                  "targetWidth",
                  "requestId",
                  "patternId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobId": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The job's ID. Pass it to `jobs/get`."
                    },
                    "kind": {
                      "enum": [
                        "pattern",
                        "product",
                        "download"
                      ],
                      "type": "string",
                      "description": "What the job makes. `pattern`: started by `patterns/create` or a refine that returns a job. `product`: started by `products/create` or `products/generate`. `download`: started by an upscale in Arcade Studio."
                    },
                    "status": {
                      "enum": [
                        "running",
                        "succeeded",
                        "failed"
                      ],
                      "type": "string",
                      "description": "A job starts as `running` and ends as `succeeded` or `failed`."
                    },
                    "result": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "patternId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque ID of one pattern: an immutable image. A refine makes a new pattern."
                                }
                              },
                              "required": [
                                "patternId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "productId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque product ID"
                                }
                              },
                              "required": [
                                "productId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "downloadUrl": {
                                  "type": "string",
                                  "format": "uri",
                                  "description": "Short-lived; read the job again to renew"
                                },
                                "expiresAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "The URL works at least until this time"
                                }
                              },
                              "required": [
                                "downloadUrl",
                                "expiresAt"
                              ]
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "What the job made, once it succeeded. Null while the job is running and when it failed. Also null on a succeeded job when a deformity fix found nothing to repair, or when the pattern has since been deleted."
                    },
                    "error": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "message": {
                              "type": "string",
                              "description": "What went wrong."
                            },
                            "reason": {
                              "const": "insufficient_credits",
                              "description": "Present when the job failed because the account ran out of credits. Add credits or a plan, then send the request again with a new `requestId`."
                            }
                          },
                          "required": [
                            "message"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why the job failed. Null unless the job failed."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the job started. For a product whose build was not recorded, when the product was created."
                    },
                    "completedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When the job finished. Null while the job is running, and for a failed product job."
                    }
                  },
                  "required": [
                    "jobId",
                    "kind",
                    "status",
                    "result",
                    "error",
                    "createdAt",
                    "completedAt"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/patterns/refine/fixDeformity": {
      "post": {
        "operationId": "patterns.refine.fixDeformity",
        "summary": "Fix deformities",
        "description": "Starts a job that detects and repairs malformed details in a pattern.",
        "tags": [
          "Refine"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "An ID you choose for this request, up to 128 characters. Retrying with the same `requestId` and body returns the original result."
                  },
                  "patternId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The pattern to refine; not a jewelry product image"
                  },
                  "maxPasses": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3
                  },
                  "force": {
                    "type": "boolean",
                    "default": false,
                    "description": "Attempt a repair even when the scan finds no deformity"
                  }
                },
                "required": [
                  "requestId",
                  "patternId",
                  "maxPasses"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobId": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The job's ID. Pass it to `jobs/get`."
                    },
                    "kind": {
                      "enum": [
                        "pattern",
                        "product",
                        "download"
                      ],
                      "type": "string",
                      "description": "What the job makes. `pattern`: started by `patterns/create` or a refine that returns a job. `product`: started by `products/create` or `products/generate`. `download`: started by an upscale in Arcade Studio."
                    },
                    "status": {
                      "enum": [
                        "running",
                        "succeeded",
                        "failed"
                      ],
                      "type": "string",
                      "description": "A job starts as `running` and ends as `succeeded` or `failed`."
                    },
                    "result": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "patternId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque ID of one pattern: an immutable image. A refine makes a new pattern."
                                }
                              },
                              "required": [
                                "patternId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "productId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque product ID"
                                }
                              },
                              "required": [
                                "productId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "downloadUrl": {
                                  "type": "string",
                                  "format": "uri",
                                  "description": "Short-lived; read the job again to renew"
                                },
                                "expiresAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "The URL works at least until this time"
                                }
                              },
                              "required": [
                                "downloadUrl",
                                "expiresAt"
                              ]
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "What the job made, once it succeeded. Null while the job is running and when it failed. Also null on a succeeded job when a deformity fix found nothing to repair, or when the pattern has since been deleted."
                    },
                    "error": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "message": {
                              "type": "string",
                              "description": "What went wrong."
                            },
                            "reason": {
                              "const": "insufficient_credits",
                              "description": "Present when the job failed because the account ran out of credits. Add credits or a plan, then send the request again with a new `requestId`."
                            }
                          },
                          "required": [
                            "message"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why the job failed. Null unless the job failed."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the job started. For a product whose build was not recorded, when the product was created."
                    },
                    "completedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When the job finished. Null while the job is running, and for a failed product job."
                    }
                  },
                  "required": [
                    "jobId",
                    "kind",
                    "status",
                    "result",
                    "error",
                    "createdAt",
                    "completedAt"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/patterns/refine/upscale": {
      "post": {
        "operationId": "patterns.refine.upscale",
        "summary": "Upscale a pattern",
        "description": "Not available through the API. Upscaling is a paid feature of Arcade Studio; requests fail with `403`.",
        "tags": [
          "Refine"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "An ID you choose for this request, up to 128 characters. Retrying with the same `requestId` and body returns the original result."
                  },
                  "patternId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The pattern to refine; not a jewelry product image"
                  },
                  "expectedCreditCost": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "Highest credit cost you accept; rejected if the current cost is higher. Omit to accept the current cost."
                  }
                },
                "required": [
                  "requestId",
                  "patternId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobId": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The job's ID. Pass it to `jobs/get`."
                    },
                    "kind": {
                      "enum": [
                        "pattern",
                        "product",
                        "download"
                      ],
                      "type": "string",
                      "description": "What the job makes. `pattern`: started by `patterns/create` or a refine that returns a job. `product`: started by `products/create` or `products/generate`. `download`: started by an upscale in Arcade Studio."
                    },
                    "status": {
                      "enum": [
                        "running",
                        "succeeded",
                        "failed"
                      ],
                      "type": "string",
                      "description": "A job starts as `running` and ends as `succeeded` or `failed`."
                    },
                    "result": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "patternId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque ID of one pattern: an immutable image. A refine makes a new pattern."
                                }
                              },
                              "required": [
                                "patternId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "productId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque product ID"
                                }
                              },
                              "required": [
                                "productId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "downloadUrl": {
                                  "type": "string",
                                  "format": "uri",
                                  "description": "Short-lived; read the job again to renew"
                                },
                                "expiresAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "The URL works at least until this time"
                                }
                              },
                              "required": [
                                "downloadUrl",
                                "expiresAt"
                              ]
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "What the job made, once it succeeded. Null while the job is running and when it failed. Also null on a succeeded job when a deformity fix found nothing to repair, or when the pattern has since been deleted."
                    },
                    "error": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "message": {
                              "type": "string",
                              "description": "What went wrong."
                            },
                            "reason": {
                              "const": "insufficient_credits",
                              "description": "Present when the job failed because the account ran out of credits. Add credits or a plan, then send the request again with a new `requestId`."
                            }
                          },
                          "required": [
                            "message"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why the job failed. Null unless the job failed."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the job started. For a product whose build was not recorded, when the product was created."
                    },
                    "completedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When the job finished. Null while the job is running, and for a failed product job."
                    }
                  },
                  "required": [
                    "jobId",
                    "kind",
                    "status",
                    "result",
                    "error",
                    "createdAt",
                    "completedAt"
                  ],
                  "description": "A download job; succeeded at once when this pattern was already upscaled"
                }
              }
            }
          }
        },
        "x-hidden": true
      }
    },
    "/jobs/get": {
      "post": {
        "operationId": "jobs.get",
        "summary": "Retrieve a job",
        "description": "Retrieves a job. Poll until `status` is `succeeded` or `failed`.",
        "tags": [
          "Jobs"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "jobId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The job's ID. Pass it to `jobs/get`."
                  }
                },
                "required": [
                  "jobId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobId": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The job's ID. Pass it to `jobs/get`."
                    },
                    "kind": {
                      "enum": [
                        "pattern",
                        "product",
                        "download"
                      ],
                      "type": "string",
                      "description": "What the job makes. `pattern`: started by `patterns/create` or a refine that returns a job. `product`: started by `products/create` or `products/generate`. `download`: started by an upscale in Arcade Studio."
                    },
                    "status": {
                      "enum": [
                        "running",
                        "succeeded",
                        "failed"
                      ],
                      "type": "string",
                      "description": "A job starts as `running` and ends as `succeeded` or `failed`."
                    },
                    "result": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "patternId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque ID of one pattern: an immutable image. A refine makes a new pattern."
                                }
                              },
                              "required": [
                                "patternId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "productId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque product ID"
                                }
                              },
                              "required": [
                                "productId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "downloadUrl": {
                                  "type": "string",
                                  "format": "uri",
                                  "description": "Short-lived; read the job again to renew"
                                },
                                "expiresAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "The URL works at least until this time"
                                }
                              },
                              "required": [
                                "downloadUrl",
                                "expiresAt"
                              ]
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "What the job made, once it succeeded. Null while the job is running and when it failed. Also null on a succeeded job when a deformity fix found nothing to repair, or when the pattern has since been deleted."
                    },
                    "error": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "message": {
                              "type": "string",
                              "description": "What went wrong."
                            },
                            "reason": {
                              "const": "insufficient_credits",
                              "description": "Present when the job failed because the account ran out of credits. Add credits or a plan, then send the request again with a new `requestId`."
                            }
                          },
                          "required": [
                            "message"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why the job failed. Null unless the job failed."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the job started. For a product whose build was not recorded, when the product was created."
                    },
                    "completedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When the job finished. Null while the job is running, and for a failed product job."
                    }
                  },
                  "required": [
                    "jobId",
                    "kind",
                    "status",
                    "result",
                    "error",
                    "createdAt",
                    "completedAt"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/references/createUpload": {
      "post": {
        "operationId": "references.createUpload",
        "summary": "Create an upload URL",
        "description": "Returns a signed URL for uploading a reference image. `PUT` the file to the URL with the required headers, then call `references/create`. Supports JPEG, PNG, WebP and GIF, up to 10 MiB.",
        "tags": [
          "References"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "An ID you choose for this request, up to 128 characters. Retrying with the same `requestId` and body returns the original result."
                  },
                  "mediaType": {
                    "enum": [
                      "image/gif",
                      "image/jpeg",
                      "image/png",
                      "image/webp"
                    ],
                    "type": "string",
                    "description": "The file's media type, such as `image/png`."
                  },
                  "byteLength": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 10485760,
                    "exclusiveMinimum": 0,
                    "description": "The file's size in bytes, at most 10 MiB. `references/create` checks the size of the file you sent."
                  }
                },
                "required": [
                  "requestId",
                  "mediaType",
                  "byteLength"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uploadId": {
                      "type": "string",
                      "pattern": "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\\.(gif|jpg|png|webp)$",
                      "description": "The upload's ID. Only the account that created it can use it."
                    },
                    "uploadUrl": {
                      "type": "string",
                      "format": "uri",
                      "description": "Signed URL to `PUT` the file to. The host can change."
                    },
                    "method": {
                      "const": "PUT"
                    },
                    "requiredHeaders": {
                      "type": "object",
                      "properties": {
                        "Content-Type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "Content-Type"
                      ],
                      "description": "Headers the `PUT` must send, exactly as given."
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the upload URL stops working."
                    }
                  },
                  "required": [
                    "uploadId",
                    "uploadUrl",
                    "method",
                    "requiredHeaders",
                    "expiresAt"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/references/create": {
      "post": {
        "operationId": "references.create",
        "summary": "Create a reference",
        "description": "Saves a file you uploaded as a reference image. Pass its `referenceId` to `patterns/create` or `patterns/refine/edit` to guide the result.",
        "tags": [
          "References"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "An ID you choose for this request, up to 128 characters. Retrying with the same `requestId` and body returns the original result."
                  },
                  "uploadId": {
                    "type": "string",
                    "pattern": "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\\.(gif|jpg|png|webp)$",
                    "description": "The `uploadId` from `references/createUpload`, after you have sent the file."
                  }
                },
                "required": [
                  "requestId",
                  "uploadId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "repeatDrop": {
                      "enum": [
                        "none",
                        "half",
                        "quarter",
                        "eighth"
                      ],
                      "type": "string",
                      "description": "How the pattern repeats. Each column of tiles is shifted down from the one before it by this fraction of the tile height: `none`, `half`, `quarter` or `eighth`. The tile itself stays square."
                    },
                    "imageUrl": {
                      "type": "string",
                      "format": "uri",
                      "description": "URL of the image. It expires; call the endpoint again for a fresh one. The host can change."
                    },
                    "thumbnailUrl": {
                      "type": "string",
                      "format": "uri",
                      "description": "URL of a small version of the image. It expires like `imageUrl`."
                    },
                    "width": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991,
                      "exclusiveMinimum": 0,
                      "description": "Width of the image in pixels."
                    },
                    "height": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991,
                      "exclusiveMinimum": 0,
                      "description": "Height of the image in pixels."
                    },
                    "mediaType": {
                      "enum": [
                        "image/gif",
                        "image/jpeg",
                        "image/png",
                        "image/webp"
                      ],
                      "type": "string",
                      "description": "The image's media type."
                    },
                    "referenceId": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The reference image's ID."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the reference was saved."
                    }
                  },
                  "required": [
                    "imageUrl",
                    "thumbnailUrl",
                    "width",
                    "height",
                    "mediaType",
                    "referenceId",
                    "createdAt"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/references/get": {
      "post": {
        "operationId": "references.get",
        "summary": "Retrieve a reference",
        "description": "Retrieves a reference image.",
        "tags": [
          "References"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "referenceId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The reference image's ID."
                  }
                },
                "required": [
                  "referenceId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "repeatDrop": {
                      "enum": [
                        "none",
                        "half",
                        "quarter",
                        "eighth"
                      ],
                      "type": "string",
                      "description": "How the pattern repeats. Each column of tiles is shifted down from the one before it by this fraction of the tile height: `none`, `half`, `quarter` or `eighth`. The tile itself stays square."
                    },
                    "imageUrl": {
                      "type": "string",
                      "format": "uri",
                      "description": "URL of the image. It expires; call the endpoint again for a fresh one. The host can change."
                    },
                    "thumbnailUrl": {
                      "type": "string",
                      "format": "uri",
                      "description": "URL of a small version of the image. It expires like `imageUrl`."
                    },
                    "width": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991,
                      "exclusiveMinimum": 0,
                      "description": "Width of the image in pixels."
                    },
                    "height": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991,
                      "exclusiveMinimum": 0,
                      "description": "Height of the image in pixels."
                    },
                    "mediaType": {
                      "enum": [
                        "image/gif",
                        "image/jpeg",
                        "image/png",
                        "image/webp"
                      ],
                      "type": "string",
                      "description": "The image's media type."
                    },
                    "referenceId": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The reference image's ID."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the reference was saved."
                    }
                  },
                  "required": [
                    "imageUrl",
                    "thumbnailUrl",
                    "width",
                    "height",
                    "mediaType",
                    "referenceId",
                    "createdAt"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/references/list": {
      "post": {
        "operationId": "references.list",
        "summary": "List references",
        "description": "Lists your references, newest first.",
        "tags": [
          "References"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cursor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The `nextCursor` from the previous page. Omit it for the first page."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 60,
                    "default": 24,
                    "description": "How many results to return per page."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "repeatDrop": {
                            "enum": [
                              "none",
                              "half",
                              "quarter",
                              "eighth"
                            ],
                            "type": "string",
                            "description": "How the pattern repeats. Each column of tiles is shifted down from the one before it by this fraction of the tile height: `none`, `half`, `quarter` or `eighth`. The tile itself stays square."
                          },
                          "imageUrl": {
                            "type": "string",
                            "format": "uri",
                            "description": "URL of the image. It expires; call the endpoint again for a fresh one. The host can change."
                          },
                          "thumbnailUrl": {
                            "type": "string",
                            "format": "uri",
                            "description": "URL of a small version of the image. It expires like `imageUrl`."
                          },
                          "width": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991,
                            "exclusiveMinimum": 0,
                            "description": "Width of the image in pixels."
                          },
                          "height": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991,
                            "exclusiveMinimum": 0,
                            "description": "Height of the image in pixels."
                          },
                          "mediaType": {
                            "enum": [
                              "image/gif",
                              "image/jpeg",
                              "image/png",
                              "image/webp"
                            ],
                            "type": "string",
                            "description": "The image's media type."
                          },
                          "referenceId": {
                            "type": "string",
                            "minLength": 1,
                            "description": "The reference image's ID."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the reference was saved."
                          }
                        },
                        "required": [
                          "imageUrl",
                          "thumbnailUrl",
                          "width",
                          "height",
                          "mediaType",
                          "referenceId",
                          "createdAt"
                        ]
                      },
                      "description": "Your references, newest first. A reference you refined or made into a product is also listed by `patterns/list`."
                    },
                    "nextCursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Pass this as `cursor` to get the next page. Null on the last page."
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/models/list": {
      "post": {
        "operationId": "models.list",
        "summary": "List models",
        "description": "Lists the models you can generate patterns with.",
        "tags": [
          "Models"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "modelId": {
                            "type": "string",
                            "description": "The model's ID."
                          },
                          "name": {
                            "type": "string",
                            "description": "The model's name."
                          }
                        },
                        "required": [
                          "modelId",
                          "name"
                        ]
                      },
                      "description": "The models you can pass to `patterns/create` as `modelId`."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/categories/list": {
      "post": {
        "operationId": "categories.list",
        "summary": "List categories",
        "description": "Lists the categories you can make products in. Each has a `world`, `print` or `jewelry`, which decides how its products are made.",
        "tags": [
          "Categories"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "categoryId": {
                            "type": "string",
                            "minLength": 1,
                            "description": "The category's ID, from `categories/list`."
                          },
                          "name": {
                            "type": "string",
                            "description": "The category's name."
                          },
                          "imageUrl": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uri"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "An image of the category. Null when there is none. The URL can expire and its host can change."
                          },
                          "world": {
                            "enum": [
                              "print",
                              "jewelry"
                            ],
                            "type": "string",
                            "description": "The kind of product. `print`: a pattern printed on a product; make it from a pattern with `products/create`, or from a prompt with `products/generate`. `jewelry`: a piece of jewelry; make it only with `products/generate`."
                          },
                          "category": {
                            "type": "object",
                            "properties": {
                              "categoryId": {
                                "type": "string",
                                "minLength": 1,
                                "description": "The group's ID. When the group is itself a category, this is its `categoryId`."
                              },
                              "name": {
                                "type": "string",
                                "description": "The group's name."
                              }
                            },
                            "required": [
                              "categoryId",
                              "name"
                            ],
                            "description": "The group this category belongs to, such as Rings for Dainty Diamond Ring. Absent when it has no group."
                          }
                        },
                        "required": [
                          "categoryId",
                          "name",
                          "imageUrl",
                          "world"
                        ]
                      },
                      "description": "The available categories."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/categories/get": {
      "post": {
        "operationId": "categories.get",
        "summary": "Retrieve a category",
        "description": "Retrieves a category, its options and a complete set of choices for them.\n\nNot every combination of option values can be made. To find one that can:\n\n1. Call with `selections: {}`. The response fills in defaults. If the returned `selections` suits you and `canManufacture` is `true`, use it.\n2. To change an option, add your choice to `selections` and call again. Choose only values with `available: true`.\n3. Repeat until the returned `selections` suits you and `canManufacture` is `true`.\n\nIf you choose only available values, the result can always be made. If the values you send cannot be made together, `canManufacture` is `false`. The values you sent that come back with `available: false` are the ones in conflict; replace one with an available value and call again.\n\nIn a `print` category, pass the returned `selections` to `products/create`. In a `jewelry` category, the options only show what is possible: `products/generate` chooses the values from your prompt, and `products/create` refuses the category.\n\n`startingPrice` is the lowest price in the category. It does not depend on the values you send.",
        "tags": [
          "Categories"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "categoryId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The category's ID, from `categories/list`."
                  },
                  "selections": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "minLength": 1,
                      "description": "An option key, from `categories/get`."
                    },
                    "additionalProperties": {
                      "type": "string",
                      "minLength": 1,
                      "description": "One of that option's values, from `categories/get`."
                    },
                    "description": "Your choices so far, as option key to option value. Send any number, including none. Arcade fills in the options you leave out.",
                    "default": {}
                  },
                  "includePriceRule": {
                    "type": "boolean",
                    "description": "Set to true to require a verified sellerPricing block. Eligible calls also receive it automatically when available."
                  },
                  "exampleProductId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "An owned, offered saved product to price as a sample. For a category, it must belong to that exact category."
                  }
                },
                "required": [
                  "categoryId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "categoryId": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The category's ID, from `categories/list`."
                    },
                    "name": {
                      "type": "string",
                      "description": "The category's name."
                    },
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "The option's key, as used in `selections`."
                          },
                          "label": {
                            "type": "string",
                            "description": "The option's display name."
                          },
                          "values": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": "string",
                                  "description": "The value, as used in `selections`."
                                },
                                "label": {
                                  "type": "string",
                                  "description": "The value's display name."
                                },
                                "isDefault": {
                                  "type": "boolean",
                                  "description": "Whether this is the option's default value."
                                },
                                "available": {
                                  "type": "boolean",
                                  "description": "Whether you can choose this value together with the values you sent for the other options."
                                }
                              },
                              "required": [
                                "value",
                                "label",
                                "isDefault",
                                "available"
                              ]
                            }
                          }
                        },
                        "required": [
                          "key",
                          "label",
                          "values"
                        ]
                      }
                    },
                    "selections": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string",
                        "minLength": 1,
                        "description": "An option key, from `categories/get`."
                      },
                      "additionalProperties": {
                        "type": "string",
                        "minLength": 1,
                        "description": "One of that option's values, from `categories/get`."
                      },
                      "description": "The choices to build with: every value you sent, plus a value for the options you left out where one fits. That value is the option's default where possible, otherwise another available value. In a `print` category, pass it to `products/create` when `canManufacture` is true."
                    },
                    "canManufacture": {
                      "type": "boolean",
                      "description": "Whether a maker can make a product with `selections`. False when the values you sent cannot be made together; `selections` then holds your values plus the defaults for the rest. In a `print` category, `products/create` uses the lowest-priced maker that can make the product."
                    },
                    "startingPrice": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "price": {
                              "type": "object",
                              "properties": {
                                "amount": {
                                  "type": "string",
                                  "description": "Decimal amount, e.g. \"48.00\""
                                },
                                "currency": {
                                  "type": "string",
                                  "description": "The currency, as an ISO 4217 code such as USD."
                                }
                              },
                              "required": [
                                "amount",
                                "currency"
                              ],
                              "description": "The price of one purchase, in USD, shipped to the United States. Includes shipping and import duty. Excludes discounts."
                            },
                            "packQuantity": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991,
                              "description": "Items in one purchase; 1 for an individual item"
                            },
                            "selections": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "minLength": 1,
                                "description": "An option key, from `categories/get`."
                              },
                              "additionalProperties": {
                                "type": "string",
                                "minLength": 1,
                                "description": "One of that option's values, from `categories/get`."
                              },
                              "description": "The option values that give this price. The values you sent do not affect it."
                            },
                            "validUntil": {
                              "type": "string",
                              "description": "When to call `categories/get` again for an up-to-date price, as an RFC 3339 UTC time. You can keep showing the price after this time."
                            }
                          },
                          "required": [
                            "price",
                            "packQuantity",
                            "selections",
                            "validUntil"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The lowest price in the category. It is a starting price, not a quote: a product's own price can differ, for example for your account or after a price change. `products/get` returns a product's price. Null when no price is available, including in every `jewelry` category. Null never means free."
                    },
                    "world": {
                      "enum": [
                        "print",
                        "jewelry"
                      ],
                      "type": "string",
                      "description": "The kind of product. `print`: a pattern printed on a product; make it from a pattern with `products/create`, or from a prompt with `products/generate`. `jewelry`: a piece of jewelry; make it only with `products/generate`."
                    },
                    "category": {
                      "type": "object",
                      "properties": {
                        "categoryId": {
                          "type": "string",
                          "minLength": 1,
                          "description": "The group's ID. When the group is itself a category, this is its `categoryId`."
                        },
                        "name": {
                          "type": "string",
                          "description": "The group's name."
                        }
                      },
                      "required": [
                        "categoryId",
                        "name"
                      ],
                      "description": "The group this category belongs to, such as Rings for Dainty Diamond Ring. Absent when it has no group."
                    },
                    "sellerPricing": {
                      "type": "object",
                      "properties": {
                        "basis": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "const": "product"
                                },
                                "productId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "The product's ID."
                                },
                                "quantity": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991,
                                  "exclusiveMinimum": 0,
                                  "description": "The requested product quantity. Prices are per sellable unit. The legacy unitPrice floor can depend on the quantity."
                                }
                              },
                              "required": [
                                "type",
                                "productId",
                                "quantity"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "const": "unsampled"
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          ]
                        },
                        "effectiveRule": {
                          "type": "object",
                          "properties": {
                            "source": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "account"
                                    }
                                  },
                                  "required": [
                                    "type"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "category"
                                    },
                                    "categoryId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "description": "The category's ID, from `categories/list`."
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "categoryId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "product"
                                    },
                                    "productId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "description": "The product's ID."
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "productId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "msrp"
                                    }
                                  },
                                  "required": [
                                    "type"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "rule": {
                              "anyOf": [
                                {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "fixed"
                                        },
                                        "price": {
                                          "type": "object",
                                          "properties": {
                                            "amount": {
                                              "type": "string",
                                              "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                              "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                            },
                                            "currency": {
                                              "const": "USD"
                                            }
                                          },
                                          "required": [
                                            "amount",
                                            "currency"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "price"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "wholesale_amount"
                                        },
                                        "delta": {
                                          "type": "object",
                                          "properties": {
                                            "amount": {
                                              "type": "string",
                                              "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                              "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                            },
                                            "currency": {
                                              "const": "USD"
                                            }
                                          },
                                          "required": [
                                            "amount",
                                            "currency"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "delta"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "wholesale_percent"
                                        },
                                        "percent": {
                                          "type": "string",
                                          "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                          "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "percent"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "source",
                            "rule"
                          ]
                        },
                        "msrp": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "available"
                                },
                                "price": {
                                  "type": "object",
                                  "properties": {
                                    "amount": {
                                      "type": "string",
                                      "description": "Decimal amount, e.g. \"48.00\""
                                    },
                                    "currency": {
                                      "type": "string",
                                      "description": "The currency, as an ISO 4217 code such as USD."
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "price"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "unavailable"
                                }
                              },
                              "required": [
                                "status"
                              ]
                            }
                          ],
                          "description": "Arcade's merchandise price for the saved configuration."
                        },
                        "wholesale": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "available"
                                },
                                "price": {
                                  "type": "object",
                                  "properties": {
                                    "amount": {
                                      "type": "string",
                                      "description": "Decimal amount, e.g. \"48.00\""
                                    },
                                    "currency": {
                                      "type": "string",
                                      "description": "The currency, as an ISO 4217 code such as USD."
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "price"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "unavailable"
                                }
                              },
                              "required": [
                                "status"
                              ]
                            }
                          ],
                          "description": "Arcade's pre-discount wholesale price disclosed to this caller."
                        },
                        "resale": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "available"
                                },
                                "price": {
                                  "type": "object",
                                  "properties": {
                                    "amount": {
                                      "type": "string",
                                      "description": "Decimal amount, e.g. \"48.00\""
                                    },
                                    "currency": {
                                      "type": "string",
                                      "description": "The currency, as an ISO 4217 code such as USD."
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "price"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "unavailable"
                                },
                                "reason": {
                                  "enum": [
                                    "wholesale_unavailable",
                                    "msrp_unavailable",
                                    "product_required",
                                    "unsupported_currency",
                                    "rule_out_of_range"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "status",
                                "reason"
                              ]
                            }
                          ],
                          "description": "Advisory resale price per sellable unit, before shipping, duty, tax and discounts."
                        },
                        "floor": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "below"
                                },
                                "price": {
                                  "type": "object",
                                  "properties": {
                                    "amount": {
                                      "type": "string",
                                      "description": "Decimal amount, e.g. \"48.00\""
                                    },
                                    "currency": {
                                      "type": "string",
                                      "description": "The currency, as an ISO 4217 code such as USD."
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "price"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "at_or_above"
                                },
                                "price": {
                                  "type": "object",
                                  "properties": {
                                    "amount": {
                                      "type": "string",
                                      "description": "Decimal amount, e.g. \"48.00\""
                                    },
                                    "currency": {
                                      "type": "string",
                                      "description": "The currency, as an ISO 4217 code such as USD."
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "price"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "unknown"
                                }
                              },
                              "required": [
                                "status"
                              ]
                            }
                          ],
                          "description": "The minimum resale price for the saved product. Uses published wholesale when present, or the existing unitPrice when no wholesale rule applies."
                        },
                        "calculatedResale": {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string",
                              "description": "Decimal amount, e.g. \"48.00\""
                            },
                            "currency": {
                              "type": "string",
                              "description": "The currency, as an ISO 4217 code such as USD."
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ],
                          "description": "The calculated amount before the purchase-price floor increased the effective resale price. Present only when the floor applied."
                        },
                        "ruleId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024,
                          "description": "An opaque ID for a rule owned by your account."
                        },
                        "revision": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024,
                          "description": "The current direct revision from pricing.listRules or a write receipt."
                        },
                        "configuredRule": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "fixed"
                                    },
                                    "price": {
                                      "type": "object",
                                      "properties": {
                                        "amount": {
                                          "type": "string",
                                          "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                          "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                        },
                                        "currency": {
                                          "const": "USD"
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "price"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "wholesale_amount"
                                    },
                                    "delta": {
                                      "type": "object",
                                      "properties": {
                                        "amount": {
                                          "type": "string",
                                          "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                          "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                        },
                                        "currency": {
                                          "const": "USD"
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "delta"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "wholesale_percent"
                                    },
                                    "percent": {
                                      "type": "string",
                                      "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                      "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "percent"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "basis",
                        "effectiveRule",
                        "msrp",
                        "wholesale",
                        "resale",
                        "floor",
                        "ruleId",
                        "revision",
                        "configuredRule"
                      ],
                      "description": "Current advisory resale pricing for this API key owner. Omission means configuration and price could not be verified or the account is not enrolled."
                    }
                  },
                  "required": [
                    "categoryId",
                    "name",
                    "options",
                    "selections",
                    "canManufacture",
                    "startingPrice",
                    "world"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "An API key is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The API key is outside the seller pricing cohort and the caller required sellerPricing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The product, category, or sample is missing or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or the supplied sample belongs to a different category.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "5XX": {
            "description": "A required lookup failed. An ordinary detail read may instead omit sellerPricing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/products/create": {
      "post": {
        "operationId": "products.create",
        "summary": "Create a product",
        "description": "Starts a job that builds a product from a pattern, a category and its selections. When the job succeeds, `result.productId` is the new product. A `jewelry` category is refused; make jewelry with `products/generate`.",
        "tags": [
          "Products"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "An ID you choose for this request, up to 128 characters. Retrying with the same `requestId` and body returns the original result."
                  },
                  "patternId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The generated or uploaded pattern to make it from; not a jewelry product image"
                  },
                  "categoryId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The category's ID, from `categories/list`."
                  },
                  "selections": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "minLength": 1,
                      "description": "An option key, from `categories/get`."
                    },
                    "additionalProperties": {
                      "type": "string",
                      "minLength": 1,
                      "description": "One of that option's values, from `categories/get`."
                    },
                    "description": "The complete `selections` object that `categories/get` returns."
                  },
                  "fit": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "crop": {
                            "type": "object",
                            "properties": {
                              "height": {
                                "type": "integer",
                                "minimum": 16,
                                "maximum": 9007199254740991
                              },
                              "left": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "top": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "width": {
                                "type": "integer",
                                "minimum": 16,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "height",
                              "left",
                              "top",
                              "width"
                            ]
                          },
                          "mode": {
                            "const": "crop"
                          },
                          "templateId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "zoomLevel": {
                            "anyOf": [
                              {
                                "const": 1
                              },
                              {
                                "const": 2
                              },
                              {
                                "const": 3
                              },
                              {
                                "const": 4
                              },
                              {
                                "const": 8
                              },
                              {
                                "const": 12
                              }
                            ]
                          }
                        },
                        "required": [
                          "crop",
                          "mode",
                          "zoomLevel"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "const": "fill"
                          }
                        },
                        "required": [
                          "mode"
                        ],
                        "additionalProperties": false
                      }
                    ],
                    "description": "How to fit the pattern to the product. Can be required when the pattern's aspect ratio does not match the product size you selected. `crop` uses part of the pattern; `fill` extends the pattern to cover the product, where the product supports it."
                  }
                },
                "required": [
                  "requestId",
                  "patternId",
                  "categoryId",
                  "selections"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobId": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The job's ID. Pass it to `jobs/get`."
                    },
                    "kind": {
                      "enum": [
                        "pattern",
                        "product",
                        "download"
                      ],
                      "type": "string",
                      "description": "What the job makes. `pattern`: started by `patterns/create` or a refine that returns a job. `product`: started by `products/create` or `products/generate`. `download`: started by an upscale in Arcade Studio."
                    },
                    "status": {
                      "enum": [
                        "running",
                        "succeeded",
                        "failed"
                      ],
                      "type": "string",
                      "description": "A job starts as `running` and ends as `succeeded` or `failed`."
                    },
                    "result": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "patternId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque ID of one pattern: an immutable image. A refine makes a new pattern."
                                }
                              },
                              "required": [
                                "patternId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "productId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque product ID"
                                }
                              },
                              "required": [
                                "productId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "downloadUrl": {
                                  "type": "string",
                                  "format": "uri",
                                  "description": "Short-lived; read the job again to renew"
                                },
                                "expiresAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "The URL works at least until this time"
                                }
                              },
                              "required": [
                                "downloadUrl",
                                "expiresAt"
                              ]
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "What the job made, once it succeeded. Null while the job is running and when it failed. Also null on a succeeded job when a deformity fix found nothing to repair, or when the pattern has since been deleted."
                    },
                    "error": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "message": {
                              "type": "string",
                              "description": "What went wrong."
                            },
                            "reason": {
                              "const": "insufficient_credits",
                              "description": "Present when the job failed because the account ran out of credits. Add credits or a plan, then send the request again with a new `requestId`."
                            }
                          },
                          "required": [
                            "message"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why the job failed. Null unless the job failed."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the job started. For a product whose build was not recorded, when the product was created."
                    },
                    "completedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When the job finished. Null while the job is running, and for a failed product job."
                    }
                  },
                  "required": [
                    "jobId",
                    "kind",
                    "status",
                    "result",
                    "error",
                    "createdAt",
                    "completedAt"
                  ],
                  "description": "A product job; its result names the product once built"
                }
              }
            }
          }
        }
      }
    },
    "/products/generate": {
      "post": {
        "operationId": "products.generate",
        "summary": "Generate a product",
        "description": "Starts a job that generates one product from a prompt, in a `print` or `jewelry` category. When the job succeeds, `result.productId` is the product; read it with `products/get`. The job finishes when the product is built.\n\nTakes only `requestId`, `prompt` and `categoryId`. Arcade chooses the options of the product:\n\n- In a `jewelry` category, from your prompt. Name the options you want there; `categories/get` lists them.\n- In a `print` category, on its own. To choose the options, a model, references or colors yourself, call `patterns/create`, then `products/create`.\n\nA jewelry prompt is checked against the category before the job starts. A prompt that clearly does not fit returns `400`. A jewelry product cannot be edited afterwards: to change the piece, generate a new product.",
        "tags": [
          "Products"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "An ID you choose for this request, up to 128 characters. Retrying with the same `requestId` and body returns the original result."
                  },
                  "prompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000,
                    "description": "What the product should look like, up to 1000 characters. In a `jewelry` category, name the options you want, such as the metal."
                  },
                  "categoryId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The category to make the product in, from `categories/list`."
                  }
                },
                "required": [
                  "requestId",
                  "prompt",
                  "categoryId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobId": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The job's ID. Pass it to `jobs/get`."
                    },
                    "kind": {
                      "enum": [
                        "pattern",
                        "product",
                        "download"
                      ],
                      "type": "string",
                      "description": "What the job makes. `pattern`: started by `patterns/create` or a refine that returns a job. `product`: started by `products/create` or `products/generate`. `download`: started by an upscale in Arcade Studio."
                    },
                    "status": {
                      "enum": [
                        "running",
                        "succeeded",
                        "failed"
                      ],
                      "type": "string",
                      "description": "A job starts as `running` and ends as `succeeded` or `failed`."
                    },
                    "result": {
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "patternId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque ID of one pattern: an immutable image. A refine makes a new pattern."
                                }
                              },
                              "required": [
                                "patternId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "productId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "Opaque product ID"
                                }
                              },
                              "required": [
                                "productId"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "downloadUrl": {
                                  "type": "string",
                                  "format": "uri",
                                  "description": "Short-lived; read the job again to renew"
                                },
                                "expiresAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "The URL works at least until this time"
                                }
                              },
                              "required": [
                                "downloadUrl",
                                "expiresAt"
                              ]
                            }
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "What the job made, once it succeeded. Null while the job is running and when it failed. Also null on a succeeded job when a deformity fix found nothing to repair, or when the pattern has since been deleted."
                    },
                    "error": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "message": {
                              "type": "string",
                              "description": "What went wrong."
                            },
                            "reason": {
                              "const": "insufficient_credits",
                              "description": "Present when the job failed because the account ran out of credits. Add credits or a plan, then send the request again with a new `requestId`."
                            }
                          },
                          "required": [
                            "message"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why the job failed. Null unless the job failed."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the job started. For a product whose build was not recorded, when the product was created."
                    },
                    "completedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "When the job finished. Null while the job is running, and for a failed product job."
                    }
                  },
                  "required": [
                    "jobId",
                    "kind",
                    "status",
                    "result",
                    "error",
                    "createdAt",
                    "completedAt"
                  ],
                  "description": "A product job; its result names the product once built"
                }
              }
            }
          }
        }
      }
    },
    "/products/get": {
      "post": {
        "operationId": "products.get",
        "summary": "Retrieve a product",
        "description": "Retrieves a product with its images, maker and price. Pass `quantity` to price that quantity. Pass `includeMakerDetails` for the maker's manufacturing and shipping windows, story, reviews and policies. The `wholesaleUnitPrice` response field is optional. Eligible accounts receive current seller pricing. Pass `includePriceRule: true` to require it.",
        "tags": [
          "Products"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "productId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The product's ID."
                  },
                  "quantity": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991,
                    "default": 1,
                    "description": "The quantity to price. `unitPrice` is the price per unit at this quantity."
                  },
                  "includeMakerDetails": {
                    "type": "boolean",
                    "default": false,
                    "description": "Also return maker.details"
                  },
                  "includePriceRule": {
                    "type": "boolean",
                    "description": "Set to true to require a verified sellerPricing block. Eligible calls also receive it automatically when available."
                  }
                },
                "required": [
                  "productId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "productId": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The product's ID."
                    },
                    "title": {
                      "type": "string",
                      "description": "The product's title."
                    },
                    "categoryId": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The category's ID, from `categories/list`."
                    },
                    "maker": {
                      "type": "object",
                      "properties": {
                        "makerId": {
                          "type": "string",
                          "description": "The maker's ID."
                        },
                        "name": {
                          "type": "string",
                          "description": "The maker's name."
                        },
                        "details": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "manufacturingDays": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "min": {
                                          "type": "integer",
                                          "minimum": -9007199254740991,
                                          "maximum": 9007199254740991
                                        },
                                        "max": {
                                          "type": "integer",
                                          "minimum": -9007199254740991,
                                          "maximum": 9007199254740991
                                        }
                                      },
                                      "required": [
                                        "min",
                                        "max"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "The maker's usual manufacturing window in days. It is per maker, not specific to this product; null when the maker has none"
                                },
                                "shippingDays": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "min": {
                                          "type": "integer",
                                          "minimum": -9007199254740991,
                                          "maximum": 9007199254740991
                                        },
                                        "max": {
                                          "type": "integer",
                                          "minimum": -9007199254740991,
                                          "maximum": 9007199254740991
                                        }
                                      },
                                      "required": [
                                        "min",
                                        "max"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "The maker's standard shipping window in days. It does not vary with the destination; null when the maker has none"
                                },
                                "location": {
                                  "type": "string",
                                  "description": "Empty when there is none"
                                },
                                "headline": {
                                  "type": "string",
                                  "description": "Empty when there is none"
                                },
                                "description": {
                                  "type": "string",
                                  "description": "Empty when there is none"
                                },
                                "story": {
                                  "type": "string",
                                  "description": "Empty when there is none"
                                },
                                "productionProcess": {
                                  "type": "string",
                                  "description": "Empty when there is none"
                                },
                                "craftNote": {
                                  "type": "string",
                                  "description": "Empty when there is none"
                                },
                                "bannerImageUrl": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "reviews": {
                                  "type": "object",
                                  "properties": {
                                    "count": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    "score": {
                                      "type": "number",
                                      "description": "The average; 0 when the maker has no reviews"
                                    }
                                  },
                                  "required": [
                                    "count",
                                    "score"
                                  ]
                                },
                                "policySections": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "title": {
                                        "type": "string"
                                      },
                                      "body": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "title",
                                      "body"
                                    ]
                                  },
                                  "description": "The maker's policies in display order"
                                }
                              },
                              "required": [
                                "manufacturingDays",
                                "shippingDays",
                                "location",
                                "headline",
                                "description",
                                "story",
                                "productionProcess",
                                "craftNote",
                                "bannerImageUrl",
                                "reviews",
                                "policySections"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Present when includeMakerDetails is true; null when the details are unavailable right now, so read again later"
                        }
                      },
                      "required": [
                        "makerId",
                        "name"
                      ]
                    },
                    "selections": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string",
                        "minLength": 1,
                        "description": "An option key, from `categories/get`."
                      },
                      "additionalProperties": {
                        "type": "string",
                        "minLength": 1,
                        "description": "One of that option's values, from `categories/get`."
                      },
                      "description": "The option values the product was made with, as option key to option value."
                    },
                    "selectionLabel": {
                      "type": "string",
                      "description": "A readable summary of the product's options."
                    },
                    "imageUrl": {
                      "type": "string",
                      "format": "uri",
                      "description": "URL of a small version of the main product image. It expires; call the endpoint again for a fresh one. The host can change."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the product was made."
                    },
                    "images": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "description": "URL of the image. It expires; call the endpoint again for a fresh one. The host can change."
                          }
                        },
                        "required": [
                          "url"
                        ]
                      },
                      "description": "Product images, primary first"
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Product details; null when they cannot be loaded"
                    },
                    "careInstructions": {
                      "type": "string",
                      "description": "Empty when there are none or they cannot be loaded right now"
                    },
                    "volumeDiscounts": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "currency": {
                              "type": "string",
                              "description": "The currency, as an ISO 4217 code such as USD."
                            },
                            "tiers": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "minimumSpend": {
                                    "type": "string",
                                    "description": "Decimal amount"
                                  },
                                  "maximumSpend": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "Decimal amount; null for the open-ended last tier"
                                  },
                                  "discountPercent": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "minimumSpend",
                                  "maximumSpend",
                                  "discountPercent"
                                ]
                              }
                            }
                          },
                          "required": [
                            "currency",
                            "tiers"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Spend tiers of the maker's volume discount; empty when it has none, and null when they are unavailable right now"
                    },
                    "patternId": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The image the product was made from. For a print product, this is its pattern. For a jewelry product, this is the product's own image, which is not a pattern: you cannot read it with `patterns/get`, refine it, use it as a reference or make another product from it. Read a jewelry product's images with `products/get`."
                    },
                    "unitPrice": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string",
                              "description": "Decimal amount, e.g. \"48.00\""
                            },
                            "currency": {
                              "type": "string",
                              "description": "The currency, as an ISO 4217 code such as USD."
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The price of one unit at the `quantity` you asked for, before the volume discount. Null when pricing is temporarily unavailable; try again later."
                    },
                    "sellerPricing": {
                      "type": "object",
                      "properties": {
                        "basis": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "const": "product"
                                },
                                "productId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "The product's ID."
                                },
                                "quantity": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991,
                                  "exclusiveMinimum": 0,
                                  "description": "The requested product quantity. Prices are per sellable unit. The legacy unitPrice floor can depend on the quantity."
                                }
                              },
                              "required": [
                                "type",
                                "productId",
                                "quantity"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "const": "unsampled"
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          ]
                        },
                        "effectiveRule": {
                          "type": "object",
                          "properties": {
                            "source": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "account"
                                    }
                                  },
                                  "required": [
                                    "type"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "category"
                                    },
                                    "categoryId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "description": "The category's ID, from `categories/list`."
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "categoryId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "product"
                                    },
                                    "productId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "description": "The product's ID."
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "productId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "msrp"
                                    }
                                  },
                                  "required": [
                                    "type"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "rule": {
                              "anyOf": [
                                {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "fixed"
                                        },
                                        "price": {
                                          "type": "object",
                                          "properties": {
                                            "amount": {
                                              "type": "string",
                                              "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                              "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                            },
                                            "currency": {
                                              "const": "USD"
                                            }
                                          },
                                          "required": [
                                            "amount",
                                            "currency"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "price"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "wholesale_amount"
                                        },
                                        "delta": {
                                          "type": "object",
                                          "properties": {
                                            "amount": {
                                              "type": "string",
                                              "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                              "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                            },
                                            "currency": {
                                              "const": "USD"
                                            }
                                          },
                                          "required": [
                                            "amount",
                                            "currency"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "delta"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "wholesale_percent"
                                        },
                                        "percent": {
                                          "type": "string",
                                          "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                          "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "percent"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "source",
                            "rule"
                          ]
                        },
                        "msrp": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "available"
                                },
                                "price": {
                                  "type": "object",
                                  "properties": {
                                    "amount": {
                                      "type": "string",
                                      "description": "Decimal amount, e.g. \"48.00\""
                                    },
                                    "currency": {
                                      "type": "string",
                                      "description": "The currency, as an ISO 4217 code such as USD."
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "price"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "unavailable"
                                }
                              },
                              "required": [
                                "status"
                              ]
                            }
                          ],
                          "description": "Arcade's merchandise price for the saved configuration."
                        },
                        "wholesale": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "available"
                                },
                                "price": {
                                  "type": "object",
                                  "properties": {
                                    "amount": {
                                      "type": "string",
                                      "description": "Decimal amount, e.g. \"48.00\""
                                    },
                                    "currency": {
                                      "type": "string",
                                      "description": "The currency, as an ISO 4217 code such as USD."
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "price"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "unavailable"
                                }
                              },
                              "required": [
                                "status"
                              ]
                            }
                          ],
                          "description": "Arcade's pre-discount wholesale price disclosed to this caller."
                        },
                        "resale": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "available"
                                },
                                "price": {
                                  "type": "object",
                                  "properties": {
                                    "amount": {
                                      "type": "string",
                                      "description": "Decimal amount, e.g. \"48.00\""
                                    },
                                    "currency": {
                                      "type": "string",
                                      "description": "The currency, as an ISO 4217 code such as USD."
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "price"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "unavailable"
                                },
                                "reason": {
                                  "enum": [
                                    "wholesale_unavailable",
                                    "msrp_unavailable",
                                    "product_required",
                                    "unsupported_currency",
                                    "rule_out_of_range"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "status",
                                "reason"
                              ]
                            }
                          ],
                          "description": "Advisory resale price per sellable unit, before shipping, duty, tax and discounts."
                        },
                        "floor": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "below"
                                },
                                "price": {
                                  "type": "object",
                                  "properties": {
                                    "amount": {
                                      "type": "string",
                                      "description": "Decimal amount, e.g. \"48.00\""
                                    },
                                    "currency": {
                                      "type": "string",
                                      "description": "The currency, as an ISO 4217 code such as USD."
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "price"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "at_or_above"
                                },
                                "price": {
                                  "type": "object",
                                  "properties": {
                                    "amount": {
                                      "type": "string",
                                      "description": "Decimal amount, e.g. \"48.00\""
                                    },
                                    "currency": {
                                      "type": "string",
                                      "description": "The currency, as an ISO 4217 code such as USD."
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "price"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "unknown"
                                }
                              },
                              "required": [
                                "status"
                              ]
                            }
                          ],
                          "description": "The minimum resale price for the saved product. Uses published wholesale when present, or the existing unitPrice when no wholesale rule applies."
                        },
                        "calculatedResale": {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string",
                              "description": "Decimal amount, e.g. \"48.00\""
                            },
                            "currency": {
                              "type": "string",
                              "description": "The currency, as an ISO 4217 code such as USD."
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ],
                          "description": "The calculated amount before the purchase-price floor increased the effective resale price. Present only when the floor applied."
                        },
                        "ruleId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024,
                          "description": "An opaque ID for a rule owned by your account."
                        },
                        "revision": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024,
                          "description": "The current direct revision from pricing.listRules or a write receipt."
                        },
                        "configuredRule": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "fixed"
                                    },
                                    "price": {
                                      "type": "object",
                                      "properties": {
                                        "amount": {
                                          "type": "string",
                                          "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                          "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                        },
                                        "currency": {
                                          "const": "USD"
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "price"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "wholesale_amount"
                                    },
                                    "delta": {
                                      "type": "object",
                                      "properties": {
                                        "amount": {
                                          "type": "string",
                                          "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                          "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                        },
                                        "currency": {
                                          "const": "USD"
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "delta"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "wholesale_percent"
                                    },
                                    "percent": {
                                      "type": "string",
                                      "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                      "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "percent"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "basis",
                        "effectiveRule",
                        "msrp",
                        "wholesale",
                        "resale",
                        "floor",
                        "ruleId",
                        "revision",
                        "configuredRule"
                      ],
                      "description": "Current advisory resale pricing for this API key owner. Omission means configuration and price could not be verified or the account is not enrolled."
                    },
                    "wholesaleUnitPrice": {
                      "type": "object",
                      "properties": {
                        "amount": {
                          "type": "string",
                          "description": "Decimal amount, e.g. \"48.00\""
                        },
                        "currency": {
                          "type": "string",
                          "description": "The currency, as an ISO 4217 code such as USD."
                        }
                      },
                      "required": [
                        "amount",
                        "currency"
                      ],
                      "description": "When present, this is the price you pay to Arcade for this item. 0.00 means free. Your margin is the difference between this value and what you charge your customer. If not present, use unitPrice."
                    }
                  },
                  "required": [
                    "productId",
                    "title",
                    "categoryId",
                    "maker",
                    "selections",
                    "selectionLabel",
                    "imageUrl",
                    "createdAt",
                    "images",
                    "description",
                    "careInstructions",
                    "volumeDiscounts",
                    "patternId",
                    "unitPrice"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "An API key is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The API key is outside the seller pricing cohort and the caller required sellerPricing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The product, category, or sample is missing or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or the supplied sample belongs to a different category.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "5XX": {
            "description": "A required lookup failed. An ordinary detail read may instead omit sellerPricing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/products/list": {
      "post": {
        "operationId": "products.list",
        "summary": "List products",
        "description": "Lists your products, newest first.",
        "tags": [
          "Products"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cursor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The `nextCursor` from the previous page. Omit it for the first page."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "default": 24,
                    "description": "How many results to return per page."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "productId": {
                            "type": "string",
                            "minLength": 1,
                            "description": "The product's ID."
                          },
                          "title": {
                            "type": "string",
                            "description": "The product's title."
                          },
                          "categoryId": {
                            "type": "string",
                            "minLength": 1,
                            "description": "The category's ID, from `categories/list`."
                          },
                          "maker": {
                            "type": "object",
                            "properties": {
                              "makerId": {
                                "type": "string",
                                "description": "The maker's ID."
                              },
                              "name": {
                                "type": "string",
                                "description": "The maker's name."
                              }
                            },
                            "required": [
                              "makerId",
                              "name"
                            ],
                            "description": "The maker that produces the product."
                          },
                          "selections": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string",
                              "minLength": 1,
                              "description": "An option key, from `categories/get`."
                            },
                            "additionalProperties": {
                              "type": "string",
                              "minLength": 1,
                              "description": "One of that option's values, from `categories/get`."
                            },
                            "description": "The option values the product was made with, as option key to option value."
                          },
                          "selectionLabel": {
                            "type": "string",
                            "description": "A readable summary of the product's options."
                          },
                          "imageUrl": {
                            "type": "string",
                            "format": "uri",
                            "description": "URL of a small version of the main product image. It expires; call the endpoint again for a fresh one. The host can change."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the product was made."
                          },
                          "patternId": {
                            "type": "string",
                            "minLength": 1,
                            "description": "The image the product was made from. For a print product, this is its pattern. For a jewelry product, this is the product's own image, which is not a pattern: you cannot read it with `patterns/get`, refine it, use it as a reference or make another product from it. Read a jewelry product's images with `products/get`."
                          }
                        },
                        "required": [
                          "productId",
                          "title",
                          "categoryId",
                          "maker",
                          "selections",
                          "selectionLabel",
                          "imageUrl",
                          "createdAt",
                          "patternId"
                        ]
                      },
                      "description": "Your products, newest first. A new product appears once its job succeeds. `products/get` returns more detail: images, description and price."
                    },
                    "nextCursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Pass this as `cursor` to get the next page. Null on the last page."
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/pricing/previewRule": {
      "post": {
        "operationId": "pricing.previewRule",
        "summary": "Preview a seller pricing rule",
        "description": "Calculates a hypothetical recommendation if you set or clear the direct rule. Returns saved configuration under current and hypothetical pricing under preview.",
        "tags": [
          "Pricing"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "target": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "const": "account"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "const": "category"
                          },
                          "categoryId": {
                            "type": "string",
                            "minLength": 1,
                            "description": "The category's ID, from `categories/list`."
                          }
                        },
                        "required": [
                          "type",
                          "categoryId"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "const": "product"
                          },
                          "productId": {
                            "type": "string",
                            "minLength": 1,
                            "description": "The product's ID."
                          }
                        },
                        "required": [
                          "type",
                          "productId"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "change": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "operation": {
                            "const": "set"
                          },
                          "rule": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "const": "fixed"
                                  },
                                  "price": {
                                    "type": "object",
                                    "properties": {
                                      "amount": {
                                        "type": "string",
                                        "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                        "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                      },
                                      "currency": {
                                        "const": "USD"
                                      }
                                    },
                                    "required": [
                                      "amount",
                                      "currency"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "type",
                                  "price"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "const": "wholesale_amount"
                                  },
                                  "delta": {
                                    "type": "object",
                                    "properties": {
                                      "amount": {
                                        "type": "string",
                                        "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                        "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                      },
                                      "currency": {
                                        "const": "USD"
                                      }
                                    },
                                    "required": [
                                      "amount",
                                      "currency"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "type",
                                  "delta"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "const": "wholesale_percent"
                                  },
                                  "percent": {
                                    "type": "string",
                                    "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                    "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                  }
                                },
                                "required": [
                                  "type",
                                  "percent"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          }
                        },
                        "required": [
                          "operation",
                          "rule"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "operation": {
                            "const": "clear"
                          }
                        },
                        "required": [
                          "operation"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "exampleProductId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "An owned, offered saved product to price as a sample. For a category, it must belong to that exact category."
                  }
                },
                "required": [
                  "target",
                  "change"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "operation": {
                      "const": "previewRule"
                    },
                    "current": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "ruleId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024,
                              "description": "An opaque ID for a rule owned by your account."
                            },
                            "revision": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024,
                              "description": "The current direct revision from pricing.listRules or a write receipt."
                            },
                            "configuredRule": {
                              "anyOf": [
                                {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "fixed"
                                        },
                                        "price": {
                                          "type": "object",
                                          "properties": {
                                            "amount": {
                                              "type": "string",
                                              "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                              "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                            },
                                            "currency": {
                                              "const": "USD"
                                            }
                                          },
                                          "required": [
                                            "amount",
                                            "currency"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "price"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "wholesale_amount"
                                        },
                                        "delta": {
                                          "type": "object",
                                          "properties": {
                                            "amount": {
                                              "type": "string",
                                              "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                              "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                            },
                                            "currency": {
                                              "const": "USD"
                                            }
                                          },
                                          "required": [
                                            "amount",
                                            "currency"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "delta"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "wholesale_percent"
                                        },
                                        "percent": {
                                          "type": "string",
                                          "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                          "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "percent"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "target": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "account"
                                    }
                                  },
                                  "required": [
                                    "type"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "category"
                                    },
                                    "categoryId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "description": "The category's ID, from `categories/list`."
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "categoryId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "product"
                                    },
                                    "productId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "description": "The product's ID."
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "productId"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "targetStatus": {
                              "const": "active"
                            }
                          },
                          "required": [
                            "ruleId",
                            "revision",
                            "configuredRule",
                            "target",
                            "targetStatus"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "ruleId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024,
                              "description": "An opaque ID for a rule owned by your account."
                            },
                            "revision": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024,
                              "description": "The current direct revision from pricing.listRules or a write receipt."
                            },
                            "configuredRule": {
                              "anyOf": [
                                {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "fixed"
                                        },
                                        "price": {
                                          "type": "object",
                                          "properties": {
                                            "amount": {
                                              "type": "string",
                                              "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                              "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                            },
                                            "currency": {
                                              "const": "USD"
                                            }
                                          },
                                          "required": [
                                            "amount",
                                            "currency"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "price"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "wholesale_amount"
                                        },
                                        "delta": {
                                          "type": "object",
                                          "properties": {
                                            "amount": {
                                              "type": "string",
                                              "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                              "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                            },
                                            "currency": {
                                              "const": "USD"
                                            }
                                          },
                                          "required": [
                                            "amount",
                                            "currency"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "delta"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "wholesale_percent"
                                        },
                                        "percent": {
                                          "type": "string",
                                          "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                          "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "percent"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "targetStatus": {
                              "const": "inactive"
                            }
                          },
                          "required": [
                            "ruleId",
                            "revision",
                            "configuredRule",
                            "targetStatus"
                          ]
                        }
                      ]
                    },
                    "preview": {
                      "type": "object",
                      "properties": {
                        "basis": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "const": "product"
                                },
                                "productId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "description": "The product's ID."
                                },
                                "quantity": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991,
                                  "exclusiveMinimum": 0,
                                  "description": "The requested product quantity. Prices are per sellable unit. The legacy unitPrice floor can depend on the quantity."
                                }
                              },
                              "required": [
                                "type",
                                "productId",
                                "quantity"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "const": "unsampled"
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          ]
                        },
                        "effectiveRule": {
                          "type": "object",
                          "properties": {
                            "source": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "account"
                                    }
                                  },
                                  "required": [
                                    "type"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "category"
                                    },
                                    "categoryId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "description": "The category's ID, from `categories/list`."
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "categoryId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "product"
                                    },
                                    "productId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "description": "The product's ID."
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "productId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "msrp"
                                    }
                                  },
                                  "required": [
                                    "type"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "rule": {
                              "anyOf": [
                                {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "fixed"
                                        },
                                        "price": {
                                          "type": "object",
                                          "properties": {
                                            "amount": {
                                              "type": "string",
                                              "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                              "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                            },
                                            "currency": {
                                              "const": "USD"
                                            }
                                          },
                                          "required": [
                                            "amount",
                                            "currency"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "price"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "wholesale_amount"
                                        },
                                        "delta": {
                                          "type": "object",
                                          "properties": {
                                            "amount": {
                                              "type": "string",
                                              "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                              "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                            },
                                            "currency": {
                                              "const": "USD"
                                            }
                                          },
                                          "required": [
                                            "amount",
                                            "currency"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "delta"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "wholesale_percent"
                                        },
                                        "percent": {
                                          "type": "string",
                                          "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                          "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "percent"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "source",
                            "rule"
                          ]
                        },
                        "msrp": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "available"
                                },
                                "price": {
                                  "type": "object",
                                  "properties": {
                                    "amount": {
                                      "type": "string",
                                      "description": "Decimal amount, e.g. \"48.00\""
                                    },
                                    "currency": {
                                      "type": "string",
                                      "description": "The currency, as an ISO 4217 code such as USD."
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "price"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "unavailable"
                                }
                              },
                              "required": [
                                "status"
                              ]
                            }
                          ],
                          "description": "Arcade's merchandise price for the saved configuration."
                        },
                        "wholesale": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "available"
                                },
                                "price": {
                                  "type": "object",
                                  "properties": {
                                    "amount": {
                                      "type": "string",
                                      "description": "Decimal amount, e.g. \"48.00\""
                                    },
                                    "currency": {
                                      "type": "string",
                                      "description": "The currency, as an ISO 4217 code such as USD."
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "price"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "unavailable"
                                }
                              },
                              "required": [
                                "status"
                              ]
                            }
                          ],
                          "description": "Arcade's pre-discount wholesale price disclosed to this caller."
                        },
                        "resale": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "available"
                                },
                                "price": {
                                  "type": "object",
                                  "properties": {
                                    "amount": {
                                      "type": "string",
                                      "description": "Decimal amount, e.g. \"48.00\""
                                    },
                                    "currency": {
                                      "type": "string",
                                      "description": "The currency, as an ISO 4217 code such as USD."
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "price"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "unavailable"
                                },
                                "reason": {
                                  "enum": [
                                    "wholesale_unavailable",
                                    "msrp_unavailable",
                                    "product_required",
                                    "unsupported_currency",
                                    "rule_out_of_range"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "status",
                                "reason"
                              ]
                            }
                          ],
                          "description": "Advisory resale price per sellable unit, before shipping, duty, tax and discounts."
                        },
                        "floor": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "below"
                                },
                                "price": {
                                  "type": "object",
                                  "properties": {
                                    "amount": {
                                      "type": "string",
                                      "description": "Decimal amount, e.g. \"48.00\""
                                    },
                                    "currency": {
                                      "type": "string",
                                      "description": "The currency, as an ISO 4217 code such as USD."
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "price"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "at_or_above"
                                },
                                "price": {
                                  "type": "object",
                                  "properties": {
                                    "amount": {
                                      "type": "string",
                                      "description": "Decimal amount, e.g. \"48.00\""
                                    },
                                    "currency": {
                                      "type": "string",
                                      "description": "The currency, as an ISO 4217 code such as USD."
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "price"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "const": "unknown"
                                }
                              },
                              "required": [
                                "status"
                              ]
                            }
                          ],
                          "description": "The minimum resale price for the saved product. Uses published wholesale when present, or the existing unitPrice when no wholesale rule applies."
                        },
                        "calculatedResale": {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string",
                              "description": "Decimal amount, e.g. \"48.00\""
                            },
                            "currency": {
                              "type": "string",
                              "description": "The currency, as an ISO 4217 code such as USD."
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ],
                          "description": "The calculated amount before the purchase-price floor increased the effective resale price. Present only when the floor applied."
                        }
                      },
                      "required": [
                        "basis",
                        "effectiveRule",
                        "msrp",
                        "wholesale",
                        "resale",
                        "floor"
                      ],
                      "description": "Hypothetical pricing. A preview saves no rule."
                    }
                  },
                  "required": [
                    "operation",
                    "current",
                    "preview"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "An API key is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The API key is outside the seller pricing cohort.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The product, category, or sample is missing or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or the supplied sample belongs to a different category.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "5XX": {
            "description": "The service could not establish the requested rule or price inputs.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/pricing/setRule": {
      "post": {
        "operationId": "pricing.setRule",
        "summary": "Set a seller pricing rule",
        "description": "Replaces a direct rule using its current revision. The response acknowledges the committed rule and includes pricing when it can be evaluated.",
        "tags": [
          "Pricing"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "target": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "const": "account"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "const": "category"
                          },
                          "categoryId": {
                            "type": "string",
                            "minLength": 1,
                            "description": "The category's ID, from `categories/list`."
                          }
                        },
                        "required": [
                          "type",
                          "categoryId"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "const": "product"
                          },
                          "productId": {
                            "type": "string",
                            "minLength": 1,
                            "description": "The product's ID."
                          }
                        },
                        "required": [
                          "type",
                          "productId"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "expectedRevision": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024,
                    "description": "The current direct revision from pricing.listRules or a write receipt."
                  },
                  "rule": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "const": "fixed"
                          },
                          "price": {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "string",
                                "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                              },
                              "currency": {
                                "const": "USD"
                              }
                            },
                            "required": [
                              "amount",
                              "currency"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "type",
                          "price"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "const": "wholesale_amount"
                          },
                          "delta": {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "string",
                                "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                              },
                              "currency": {
                                "const": "USD"
                              }
                            },
                            "required": [
                              "amount",
                              "currency"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "type",
                          "delta"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "const": "wholesale_percent"
                          },
                          "percent": {
                            "type": "string",
                            "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                            "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                          }
                        },
                        "required": [
                          "type",
                          "percent"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "exampleProductId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "An owned, offered saved product to price as a sample. For a category, it must belong to that exact category."
                  }
                },
                "required": [
                  "target",
                  "expectedRevision",
                  "rule"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "operation": {
                          "const": "setRule"
                        },
                        "status": {
                          "enum": [
                            "applied",
                            "unchanged"
                          ],
                          "type": "string"
                        },
                        "entry": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "ruleId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "An opaque ID for a rule owned by your account."
                                },
                                "revision": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "The current direct revision from pricing.listRules or a write receipt."
                                },
                                "configuredRule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "fixed"
                                            },
                                            "price": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "price"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_amount"
                                            },
                                            "delta": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delta"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_percent"
                                            },
                                            "percent": {
                                              "type": "string",
                                              "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                              "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "percent"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "target": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "account"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "category"
                                        },
                                        "categoryId": {
                                          "type": "string",
                                          "minLength": 1,
                                          "description": "The category's ID, from `categories/list`."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "categoryId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "product"
                                        },
                                        "productId": {
                                          "type": "string",
                                          "minLength": 1,
                                          "description": "The product's ID."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "productId"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "targetStatus": {
                                  "const": "active"
                                }
                              },
                              "required": [
                                "ruleId",
                                "revision",
                                "configuredRule",
                                "target",
                                "targetStatus"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "ruleId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "An opaque ID for a rule owned by your account."
                                },
                                "revision": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "The current direct revision from pricing.listRules or a write receipt."
                                },
                                "configuredRule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "fixed"
                                            },
                                            "price": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "price"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_amount"
                                            },
                                            "delta": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delta"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_percent"
                                            },
                                            "percent": {
                                              "type": "string",
                                              "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                              "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "percent"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "targetStatus": {
                                  "const": "inactive"
                                }
                              },
                              "required": [
                                "ruleId",
                                "revision",
                                "configuredRule",
                                "targetStatus"
                              ]
                            }
                          ]
                        },
                        "pricingStatus": {
                          "const": "evaluated"
                        },
                        "sellerPricing": {
                          "type": "object",
                          "properties": {
                            "basis": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "product"
                                    },
                                    "productId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "description": "The product's ID."
                                    },
                                    "quantity": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991,
                                      "exclusiveMinimum": 0,
                                      "description": "The requested product quantity. Prices are per sellable unit. The legacy unitPrice floor can depend on the quantity."
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "productId",
                                    "quantity"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "unsampled"
                                    }
                                  },
                                  "required": [
                                    "type"
                                  ]
                                }
                              ]
                            },
                            "effectiveRule": {
                              "type": "object",
                              "properties": {
                                "source": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "account"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "category"
                                        },
                                        "categoryId": {
                                          "type": "string",
                                          "minLength": 1,
                                          "description": "The category's ID, from `categories/list`."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "categoryId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "product"
                                        },
                                        "productId": {
                                          "type": "string",
                                          "minLength": 1,
                                          "description": "The product's ID."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "productId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "msrp"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "rule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "fixed"
                                            },
                                            "price": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "price"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_amount"
                                            },
                                            "delta": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delta"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_percent"
                                            },
                                            "percent": {
                                              "type": "string",
                                              "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                              "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "percent"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "source",
                                "rule"
                              ]
                            },
                            "msrp": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "const": "available"
                                    },
                                    "price": {
                                      "type": "object",
                                      "properties": {
                                        "amount": {
                                          "type": "string",
                                          "description": "Decimal amount, e.g. \"48.00\""
                                        },
                                        "currency": {
                                          "type": "string",
                                          "description": "The currency, as an ISO 4217 code such as USD."
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "price"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "const": "unavailable"
                                    }
                                  },
                                  "required": [
                                    "status"
                                  ]
                                }
                              ],
                              "description": "Arcade's merchandise price for the saved configuration."
                            },
                            "wholesale": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "const": "available"
                                    },
                                    "price": {
                                      "type": "object",
                                      "properties": {
                                        "amount": {
                                          "type": "string",
                                          "description": "Decimal amount, e.g. \"48.00\""
                                        },
                                        "currency": {
                                          "type": "string",
                                          "description": "The currency, as an ISO 4217 code such as USD."
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "price"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "const": "unavailable"
                                    }
                                  },
                                  "required": [
                                    "status"
                                  ]
                                }
                              ],
                              "description": "Arcade's pre-discount wholesale price disclosed to this caller."
                            },
                            "resale": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "const": "available"
                                    },
                                    "price": {
                                      "type": "object",
                                      "properties": {
                                        "amount": {
                                          "type": "string",
                                          "description": "Decimal amount, e.g. \"48.00\""
                                        },
                                        "currency": {
                                          "type": "string",
                                          "description": "The currency, as an ISO 4217 code such as USD."
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "price"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "const": "unavailable"
                                    },
                                    "reason": {
                                      "enum": [
                                        "wholesale_unavailable",
                                        "msrp_unavailable",
                                        "product_required",
                                        "unsupported_currency",
                                        "rule_out_of_range"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "reason"
                                  ]
                                }
                              ],
                              "description": "Advisory resale price per sellable unit, before shipping, duty, tax and discounts."
                            },
                            "floor": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "const": "below"
                                    },
                                    "price": {
                                      "type": "object",
                                      "properties": {
                                        "amount": {
                                          "type": "string",
                                          "description": "Decimal amount, e.g. \"48.00\""
                                        },
                                        "currency": {
                                          "type": "string",
                                          "description": "The currency, as an ISO 4217 code such as USD."
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "price"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "const": "at_or_above"
                                    },
                                    "price": {
                                      "type": "object",
                                      "properties": {
                                        "amount": {
                                          "type": "string",
                                          "description": "Decimal amount, e.g. \"48.00\""
                                        },
                                        "currency": {
                                          "type": "string",
                                          "description": "The currency, as an ISO 4217 code such as USD."
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "price"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "const": "unknown"
                                    }
                                  },
                                  "required": [
                                    "status"
                                  ]
                                }
                              ],
                              "description": "The minimum resale price for the saved product. Uses published wholesale when present, or the existing unitPrice when no wholesale rule applies."
                            },
                            "calculatedResale": {
                              "type": "object",
                              "properties": {
                                "amount": {
                                  "type": "string",
                                  "description": "Decimal amount, e.g. \"48.00\""
                                },
                                "currency": {
                                  "type": "string",
                                  "description": "The currency, as an ISO 4217 code such as USD."
                                }
                              },
                              "required": [
                                "amount",
                                "currency"
                              ],
                              "description": "The calculated amount before the purchase-price floor increased the effective resale price. Present only when the floor applied."
                            }
                          },
                          "required": [
                            "basis",
                            "effectiveRule",
                            "msrp",
                            "wholesale",
                            "resale",
                            "floor"
                          ]
                        }
                      },
                      "required": [
                        "operation",
                        "status",
                        "entry",
                        "pricingStatus",
                        "sellerPricing"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "operation": {
                          "const": "setRule"
                        },
                        "status": {
                          "enum": [
                            "applied",
                            "unchanged"
                          ],
                          "type": "string"
                        },
                        "entry": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "ruleId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "An opaque ID for a rule owned by your account."
                                },
                                "revision": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "The current direct revision from pricing.listRules or a write receipt."
                                },
                                "configuredRule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "fixed"
                                            },
                                            "price": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "price"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_amount"
                                            },
                                            "delta": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delta"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_percent"
                                            },
                                            "percent": {
                                              "type": "string",
                                              "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                              "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "percent"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "target": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "account"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "category"
                                        },
                                        "categoryId": {
                                          "type": "string",
                                          "minLength": 1,
                                          "description": "The category's ID, from `categories/list`."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "categoryId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "product"
                                        },
                                        "productId": {
                                          "type": "string",
                                          "minLength": 1,
                                          "description": "The product's ID."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "productId"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "targetStatus": {
                                  "const": "active"
                                }
                              },
                              "required": [
                                "ruleId",
                                "revision",
                                "configuredRule",
                                "target",
                                "targetStatus"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "ruleId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "An opaque ID for a rule owned by your account."
                                },
                                "revision": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "The current direct revision from pricing.listRules or a write receipt."
                                },
                                "configuredRule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "fixed"
                                            },
                                            "price": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "price"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_amount"
                                            },
                                            "delta": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delta"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_percent"
                                            },
                                            "percent": {
                                              "type": "string",
                                              "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                              "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "percent"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "targetStatus": {
                                  "const": "inactive"
                                }
                              },
                              "required": [
                                "ruleId",
                                "revision",
                                "configuredRule",
                                "targetStatus"
                              ]
                            }
                          ]
                        },
                        "pricingStatus": {
                          "const": "no_context"
                        }
                      },
                      "required": [
                        "operation",
                        "status",
                        "entry",
                        "pricingStatus"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "operation": {
                          "const": "setRule"
                        },
                        "status": {
                          "enum": [
                            "applied",
                            "unchanged"
                          ],
                          "type": "string"
                        },
                        "entry": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "ruleId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "An opaque ID for a rule owned by your account."
                                },
                                "revision": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "The current direct revision from pricing.listRules or a write receipt."
                                },
                                "configuredRule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "fixed"
                                            },
                                            "price": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "price"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_amount"
                                            },
                                            "delta": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delta"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_percent"
                                            },
                                            "percent": {
                                              "type": "string",
                                              "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                              "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "percent"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "target": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "account"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "category"
                                        },
                                        "categoryId": {
                                          "type": "string",
                                          "minLength": 1,
                                          "description": "The category's ID, from `categories/list`."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "categoryId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "product"
                                        },
                                        "productId": {
                                          "type": "string",
                                          "minLength": 1,
                                          "description": "The product's ID."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "productId"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "targetStatus": {
                                  "const": "active"
                                }
                              },
                              "required": [
                                "ruleId",
                                "revision",
                                "configuredRule",
                                "target",
                                "targetStatus"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "ruleId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "An opaque ID for a rule owned by your account."
                                },
                                "revision": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "The current direct revision from pricing.listRules or a write receipt."
                                },
                                "configuredRule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "fixed"
                                            },
                                            "price": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "price"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_amount"
                                            },
                                            "delta": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delta"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_percent"
                                            },
                                            "percent": {
                                              "type": "string",
                                              "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                              "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "percent"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "targetStatus": {
                                  "const": "inactive"
                                }
                              },
                              "required": [
                                "ruleId",
                                "revision",
                                "configuredRule",
                                "targetStatus"
                              ]
                            }
                          ]
                        },
                        "pricingStatus": {
                          "const": "unavailable"
                        }
                      },
                      "required": [
                        "operation",
                        "status",
                        "entry",
                        "pricingStatus"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "An API key is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The API key is outside the seller pricing cohort or lacks the writer grant.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The product, category, or sample is missing or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "412": {
            "description": "The direct revision is stale or belongs to a different target. Read the current entry before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, a mismatched category sample, or an unsupported product currency on set.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "428": {
            "description": "The request omitted expectedRevision.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "5XX": {
            "description": "Reconcile an unknown write outcome by calling pricing.listRules with the target or rule ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/pricing/clearRule": {
      "post": {
        "operationId": "pricing.clearRule",
        "summary": "Clear a seller pricing rule",
        "description": "Clears a direct rule and resumes inheritance. Use the current target and its revision, or the rule ID and revision of an inactive entry.",
        "tags": [
          "Pricing"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "target": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "const": "account"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "const": "category"
                              },
                              "categoryId": {
                                "type": "string",
                                "minLength": 1,
                                "description": "The category's ID, from `categories/list`."
                              }
                            },
                            "required": [
                              "type",
                              "categoryId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "const": "product"
                              },
                              "productId": {
                                "type": "string",
                                "minLength": 1,
                                "description": "The product's ID."
                              }
                            },
                            "required": [
                              "type",
                              "productId"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "expectedRevision": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024,
                        "description": "The current direct revision from pricing.listRules or a write receipt."
                      },
                      "exampleProductId": {
                        "type": "string",
                        "minLength": 1,
                        "description": "An owned, offered saved product to price as a sample. For a category, it must belong to that exact category."
                      }
                    },
                    "required": [
                      "target",
                      "expectedRevision"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "ruleId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024,
                        "description": "An opaque ID for a rule owned by your account."
                      },
                      "expectedRevision": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024,
                        "description": "The current direct revision from pricing.listRules or a write receipt."
                      }
                    },
                    "required": [
                      "ruleId",
                      "expectedRevision"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "operation": {
                          "const": "clearRule"
                        },
                        "status": {
                          "enum": [
                            "applied",
                            "unchanged"
                          ],
                          "type": "string"
                        },
                        "entry": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "ruleId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "An opaque ID for a rule owned by your account."
                                },
                                "revision": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "The current direct revision from pricing.listRules or a write receipt."
                                },
                                "configuredRule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "fixed"
                                            },
                                            "price": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "price"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_amount"
                                            },
                                            "delta": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delta"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_percent"
                                            },
                                            "percent": {
                                              "type": "string",
                                              "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                              "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "percent"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "target": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "account"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "category"
                                        },
                                        "categoryId": {
                                          "type": "string",
                                          "minLength": 1,
                                          "description": "The category's ID, from `categories/list`."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "categoryId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "product"
                                        },
                                        "productId": {
                                          "type": "string",
                                          "minLength": 1,
                                          "description": "The product's ID."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "productId"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "targetStatus": {
                                  "const": "active"
                                }
                              },
                              "required": [
                                "ruleId",
                                "revision",
                                "configuredRule",
                                "target",
                                "targetStatus"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "ruleId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "An opaque ID for a rule owned by your account."
                                },
                                "revision": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "The current direct revision from pricing.listRules or a write receipt."
                                },
                                "configuredRule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "fixed"
                                            },
                                            "price": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "price"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_amount"
                                            },
                                            "delta": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delta"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_percent"
                                            },
                                            "percent": {
                                              "type": "string",
                                              "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                              "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "percent"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "targetStatus": {
                                  "const": "inactive"
                                }
                              },
                              "required": [
                                "ruleId",
                                "revision",
                                "configuredRule",
                                "targetStatus"
                              ]
                            }
                          ]
                        },
                        "pricingStatus": {
                          "const": "evaluated"
                        },
                        "sellerPricing": {
                          "type": "object",
                          "properties": {
                            "basis": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "product"
                                    },
                                    "productId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "description": "The product's ID."
                                    },
                                    "quantity": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991,
                                      "exclusiveMinimum": 0,
                                      "description": "The requested product quantity. Prices are per sellable unit. The legacy unitPrice floor can depend on the quantity."
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "productId",
                                    "quantity"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "const": "unsampled"
                                    }
                                  },
                                  "required": [
                                    "type"
                                  ]
                                }
                              ]
                            },
                            "effectiveRule": {
                              "type": "object",
                              "properties": {
                                "source": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "account"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "category"
                                        },
                                        "categoryId": {
                                          "type": "string",
                                          "minLength": 1,
                                          "description": "The category's ID, from `categories/list`."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "categoryId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "product"
                                        },
                                        "productId": {
                                          "type": "string",
                                          "minLength": 1,
                                          "description": "The product's ID."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "productId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "msrp"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "rule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "fixed"
                                            },
                                            "price": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "price"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_amount"
                                            },
                                            "delta": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delta"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_percent"
                                            },
                                            "percent": {
                                              "type": "string",
                                              "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                              "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "percent"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "source",
                                "rule"
                              ]
                            },
                            "msrp": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "const": "available"
                                    },
                                    "price": {
                                      "type": "object",
                                      "properties": {
                                        "amount": {
                                          "type": "string",
                                          "description": "Decimal amount, e.g. \"48.00\""
                                        },
                                        "currency": {
                                          "type": "string",
                                          "description": "The currency, as an ISO 4217 code such as USD."
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "price"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "const": "unavailable"
                                    }
                                  },
                                  "required": [
                                    "status"
                                  ]
                                }
                              ],
                              "description": "Arcade's merchandise price for the saved configuration."
                            },
                            "wholesale": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "const": "available"
                                    },
                                    "price": {
                                      "type": "object",
                                      "properties": {
                                        "amount": {
                                          "type": "string",
                                          "description": "Decimal amount, e.g. \"48.00\""
                                        },
                                        "currency": {
                                          "type": "string",
                                          "description": "The currency, as an ISO 4217 code such as USD."
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "price"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "const": "unavailable"
                                    }
                                  },
                                  "required": [
                                    "status"
                                  ]
                                }
                              ],
                              "description": "Arcade's pre-discount wholesale price disclosed to this caller."
                            },
                            "resale": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "const": "available"
                                    },
                                    "price": {
                                      "type": "object",
                                      "properties": {
                                        "amount": {
                                          "type": "string",
                                          "description": "Decimal amount, e.g. \"48.00\""
                                        },
                                        "currency": {
                                          "type": "string",
                                          "description": "The currency, as an ISO 4217 code such as USD."
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "price"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "const": "unavailable"
                                    },
                                    "reason": {
                                      "enum": [
                                        "wholesale_unavailable",
                                        "msrp_unavailable",
                                        "product_required",
                                        "unsupported_currency",
                                        "rule_out_of_range"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "reason"
                                  ]
                                }
                              ],
                              "description": "Advisory resale price per sellable unit, before shipping, duty, tax and discounts."
                            },
                            "floor": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "const": "below"
                                    },
                                    "price": {
                                      "type": "object",
                                      "properties": {
                                        "amount": {
                                          "type": "string",
                                          "description": "Decimal amount, e.g. \"48.00\""
                                        },
                                        "currency": {
                                          "type": "string",
                                          "description": "The currency, as an ISO 4217 code such as USD."
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "price"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "const": "at_or_above"
                                    },
                                    "price": {
                                      "type": "object",
                                      "properties": {
                                        "amount": {
                                          "type": "string",
                                          "description": "Decimal amount, e.g. \"48.00\""
                                        },
                                        "currency": {
                                          "type": "string",
                                          "description": "The currency, as an ISO 4217 code such as USD."
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "price"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "const": "unknown"
                                    }
                                  },
                                  "required": [
                                    "status"
                                  ]
                                }
                              ],
                              "description": "The minimum resale price for the saved product. Uses published wholesale when present, or the existing unitPrice when no wholesale rule applies."
                            },
                            "calculatedResale": {
                              "type": "object",
                              "properties": {
                                "amount": {
                                  "type": "string",
                                  "description": "Decimal amount, e.g. \"48.00\""
                                },
                                "currency": {
                                  "type": "string",
                                  "description": "The currency, as an ISO 4217 code such as USD."
                                }
                              },
                              "required": [
                                "amount",
                                "currency"
                              ],
                              "description": "The calculated amount before the purchase-price floor increased the effective resale price. Present only when the floor applied."
                            }
                          },
                          "required": [
                            "basis",
                            "effectiveRule",
                            "msrp",
                            "wholesale",
                            "resale",
                            "floor"
                          ]
                        }
                      },
                      "required": [
                        "operation",
                        "status",
                        "entry",
                        "pricingStatus",
                        "sellerPricing"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "operation": {
                          "const": "clearRule"
                        },
                        "status": {
                          "enum": [
                            "applied",
                            "unchanged"
                          ],
                          "type": "string"
                        },
                        "entry": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "ruleId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "An opaque ID for a rule owned by your account."
                                },
                                "revision": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "The current direct revision from pricing.listRules or a write receipt."
                                },
                                "configuredRule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "fixed"
                                            },
                                            "price": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "price"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_amount"
                                            },
                                            "delta": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delta"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_percent"
                                            },
                                            "percent": {
                                              "type": "string",
                                              "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                              "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "percent"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "target": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "account"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "category"
                                        },
                                        "categoryId": {
                                          "type": "string",
                                          "minLength": 1,
                                          "description": "The category's ID, from `categories/list`."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "categoryId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "product"
                                        },
                                        "productId": {
                                          "type": "string",
                                          "minLength": 1,
                                          "description": "The product's ID."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "productId"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "targetStatus": {
                                  "const": "active"
                                }
                              },
                              "required": [
                                "ruleId",
                                "revision",
                                "configuredRule",
                                "target",
                                "targetStatus"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "ruleId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "An opaque ID for a rule owned by your account."
                                },
                                "revision": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "The current direct revision from pricing.listRules or a write receipt."
                                },
                                "configuredRule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "fixed"
                                            },
                                            "price": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "price"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_amount"
                                            },
                                            "delta": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delta"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_percent"
                                            },
                                            "percent": {
                                              "type": "string",
                                              "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                              "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "percent"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "targetStatus": {
                                  "const": "inactive"
                                }
                              },
                              "required": [
                                "ruleId",
                                "revision",
                                "configuredRule",
                                "targetStatus"
                              ]
                            }
                          ]
                        },
                        "pricingStatus": {
                          "const": "no_context"
                        }
                      },
                      "required": [
                        "operation",
                        "status",
                        "entry",
                        "pricingStatus"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "operation": {
                          "const": "clearRule"
                        },
                        "status": {
                          "enum": [
                            "applied",
                            "unchanged"
                          ],
                          "type": "string"
                        },
                        "entry": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "ruleId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "An opaque ID for a rule owned by your account."
                                },
                                "revision": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "The current direct revision from pricing.listRules or a write receipt."
                                },
                                "configuredRule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "fixed"
                                            },
                                            "price": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "price"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_amount"
                                            },
                                            "delta": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delta"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_percent"
                                            },
                                            "percent": {
                                              "type": "string",
                                              "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                              "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "percent"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "target": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "account"
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "category"
                                        },
                                        "categoryId": {
                                          "type": "string",
                                          "minLength": 1,
                                          "description": "The category's ID, from `categories/list`."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "categoryId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "const": "product"
                                        },
                                        "productId": {
                                          "type": "string",
                                          "minLength": 1,
                                          "description": "The product's ID."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "productId"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "targetStatus": {
                                  "const": "active"
                                }
                              },
                              "required": [
                                "ruleId",
                                "revision",
                                "configuredRule",
                                "target",
                                "targetStatus"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "ruleId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "An opaque ID for a rule owned by your account."
                                },
                                "revision": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024,
                                  "description": "The current direct revision from pricing.listRules or a write receipt."
                                },
                                "configuredRule": {
                                  "anyOf": [
                                    {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "fixed"
                                            },
                                            "price": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "price"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_amount"
                                            },
                                            "delta": {
                                              "type": "object",
                                              "properties": {
                                                "amount": {
                                                  "type": "string",
                                                  "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                                  "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                                },
                                                "currency": {
                                                  "const": "USD"
                                                }
                                              },
                                              "required": [
                                                "amount",
                                                "currency"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delta"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "const": "wholesale_percent"
                                            },
                                            "percent": {
                                              "type": "string",
                                              "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                              "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "percent"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "targetStatus": {
                                  "const": "inactive"
                                }
                              },
                              "required": [
                                "ruleId",
                                "revision",
                                "configuredRule",
                                "targetStatus"
                              ]
                            }
                          ]
                        },
                        "pricingStatus": {
                          "const": "unavailable"
                        }
                      },
                      "required": [
                        "operation",
                        "status",
                        "entry",
                        "pricingStatus"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "An API key is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The API key is outside the seller pricing cohort or lacks the writer grant.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The product, category, or sample is missing or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "The target for this rule ID is active. Clear the rule by target instead.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "reason"
                      ],
                      "properties": {
                        "reason": {
                          "const": "target_active"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "412": {
            "description": "The direct revision is stale or belongs to a different target. Read the current entry before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, a mismatched category sample, or an unsupported product currency on set.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "428": {
            "description": "The request omitted expectedRevision.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "5XX": {
            "description": "Reconcile an unknown write outcome by calling pricing.listRules with the target or rule ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/pricing/listRules": {
      "post": {
        "operationId": "pricing.listRules",
        "summary": "List seller pricing rules",
        "description": "Pages through configured rules, including inactive entries, or looks up one target or rule ID. Look up a target to obtain its current revision before a write.",
        "tags": [
          "Pricing"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "limit": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100,
                        "description": "Page size. Defaults to 25."
                      },
                      "cursor": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024,
                        "description": "The nextCursor from a previous rule inventory page."
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "target": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "const": "account"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "const": "category"
                              },
                              "categoryId": {
                                "type": "string",
                                "minLength": 1,
                                "description": "The category's ID, from `categories/list`."
                              }
                            },
                            "required": [
                              "type",
                              "categoryId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "const": "product"
                              },
                              "productId": {
                                "type": "string",
                                "minLength": 1,
                                "description": "The product's ID."
                              }
                            },
                            "required": [
                              "type",
                              "productId"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "required": [
                      "target"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "ruleId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024,
                        "description": "An opaque ID for a rule owned by your account."
                      }
                    },
                    "required": [
                      "ruleId"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "entries": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "ruleId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024,
                                "description": "An opaque ID for a rule owned by your account."
                              },
                              "revision": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024,
                                "description": "The current direct revision from pricing.listRules or a write receipt."
                              },
                              "configuredRule": {
                                "anyOf": [
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "const": "fixed"
                                          },
                                          "price": {
                                            "type": "object",
                                            "properties": {
                                              "amount": {
                                                "type": "string",
                                                "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                                "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                              },
                                              "currency": {
                                                "const": "USD"
                                              }
                                            },
                                            "required": [
                                              "amount",
                                              "currency"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "price"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "const": "wholesale_amount"
                                          },
                                          "delta": {
                                            "type": "object",
                                            "properties": {
                                              "amount": {
                                                "type": "string",
                                                "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                                "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                              },
                                              "currency": {
                                                "const": "USD"
                                              }
                                            },
                                            "required": [
                                              "amount",
                                              "currency"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "delta"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "const": "wholesale_percent"
                                          },
                                          "percent": {
                                            "type": "string",
                                            "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                            "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "percent"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "target": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "const": "account"
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "const": "category"
                                      },
                                      "categoryId": {
                                        "type": "string",
                                        "minLength": 1,
                                        "description": "The category's ID, from `categories/list`."
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "categoryId"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "const": "product"
                                      },
                                      "productId": {
                                        "type": "string",
                                        "minLength": 1,
                                        "description": "The product's ID."
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "productId"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "targetStatus": {
                                "const": "active"
                              }
                            },
                            "required": [
                              "ruleId",
                              "revision",
                              "configuredRule",
                              "target",
                              "targetStatus"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "ruleId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024,
                                "description": "An opaque ID for a rule owned by your account."
                              },
                              "revision": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024,
                                "description": "The current direct revision from pricing.listRules or a write receipt."
                              },
                              "configuredRule": {
                                "anyOf": [
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "const": "fixed"
                                          },
                                          "price": {
                                            "type": "object",
                                            "properties": {
                                              "amount": {
                                                "type": "string",
                                                "pattern": "^\\d{1,10}(?:\\.\\d{1,2})?$",
                                                "description": "A nonnegative USD amount up to 9999999999.99, with up to two decimal places."
                                              },
                                              "currency": {
                                                "const": "USD"
                                              }
                                            },
                                            "required": [
                                              "amount",
                                              "currency"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "price"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "const": "wholesale_amount"
                                          },
                                          "delta": {
                                            "type": "object",
                                            "properties": {
                                              "amount": {
                                                "type": "string",
                                                "pattern": "^[+-]?\\d{1,10}(?:\\.\\d{1,2})?$",
                                                "description": "A signed USD amount up to 9999999999.99 in magnitude, with up to two decimal places."
                                              },
                                              "currency": {
                                                "const": "USD"
                                              }
                                            },
                                            "required": [
                                              "amount",
                                              "currency"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "delta"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "const": "wholesale_percent"
                                          },
                                          "percent": {
                                            "type": "string",
                                            "pattern": "^[+-]?\\d{1,5}(?:\\.\\d{1,2})?$",
                                            "description": "A signed percent from -100.00 through 10000.00, with up to two decimal places."
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "percent"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "targetStatus": {
                                "const": "inactive"
                              }
                            },
                            "required": [
                              "ruleId",
                              "revision",
                              "configuredRule",
                              "targetStatus"
                            ]
                          }
                        ]
                      }
                    },
                    "nextCursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Pass this as `cursor` to get the next page. Null on the last page."
                    }
                  },
                  "required": [
                    "entries",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "An API key is required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The API key is outside the seller pricing cohort.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The product, category, or sample is missing or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid input, or the supplied sample belongs to a different category.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "5XX": {
            "description": "The service could not establish the requested rule or price inputs.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "status",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/checkouts/quoteDropshipping": {
      "post": {
        "operationId": "checkouts.quoteDropshipping",
        "summary": "Quote dropshipping credits",
        "description": "Returns what dropshipping currently costs your account, in credits per dropshipped item. A checkout is charged `creditCost` for each line with `quantity: 1`, or once if it has none. Call this before you create a checkout with `dropShip: true`, and confirm that total. Then pass `creditCost` as `expectedDropshippingCreditCost` and `revision`, as a number, as `expectedDropshippingPolicyRevision`.",
        "tags": [
          "Checkouts"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "creditCost": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991,
                      "description": "What one dropshipped item costs you, in credits. 0 when the cost is waived."
                    },
                    "standardCreditCost": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991,
                      "description": "The cost per item without a waiver, in credits."
                    },
                    "revision": {
                      "type": "string",
                      "description": "The version of the pricing this quote uses."
                    },
                    "waiverReason": {
                      "anyOf": [
                        {
                          "enum": [
                            "plan",
                            "introductory"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Why the cost is waived. `plan`: your paid plan includes dropshipping. `introductory`: an introductory offer applies. Null when the cost is not waived."
                    },
                    "includesDropshipping": {
                      "type": "boolean",
                      "description": "Whether your paid plan includes dropshipping."
                    },
                    "planId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Your paid plan. Null when you have none."
                    }
                  },
                  "required": [
                    "creditCost",
                    "standardCreditCost",
                    "revision",
                    "waiverReason",
                    "includesDropshipping",
                    "planId"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/checkouts/cancel": {
      "post": {
        "operationId": "checkouts.cancel",
        "summary": "Cancel an unpaid dropshipping checkout",
        "description": "Cancels an unpaid dropshipping checkout. Returns `completed` if the checkout was already paid. Cancelling does not guarantee that the checkout page stops working: if someone still pays, the agreed credits are charged, even if that leaves a negative credit balance.",
        "tags": [
          "Checkouts"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "checkoutId": {
                    "type": "string",
                    "pattern": "^\\d+$",
                    "description": "The checkout's ID. After payment, pass it to `orders/get` to find the order."
                  }
                },
                "required": [
                  "checkoutId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "enum": [
                        "canceled",
                        "completed"
                      ],
                      "type": "string",
                      "description": "`canceled`: the checkout was cancelled. `completed`: the checkout was already paid, so it was not cancelled."
                    }
                  },
                  "required": [
                    "state"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/checkouts/create": {
      "post": {
        "operationId": "checkouts.create",
        "summary": "Create a checkout",
        "description": "Creates a checkout for one or more of your products. Open `checkoutUrl` to pay; the order is placed once payment completes. If the price check finds an unavailable wholesale price, the request returns `412 PRECONDITION_FAILED` before creating a draft. If any line has `quantity: 1`, the checkout needs dropshipping: set `dropShip` to true, unless you have a paid plan that includes dropshipping. Otherwise the request returns `412 PRECONDITION_FAILED`. Before a checkout with `dropShip: true`, call `checkouts/quoteDropshipping` and pass its `creditCost` and `revision` as `expectedDropshippingCreditCost` and `expectedDropshippingPolicyRevision`.",
        "tags": [
          "Checkouts"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "An ID you choose for this request, up to 128 characters. Retrying with the same `requestId` and body returns the original result."
                  },
                  "expectedDropshippingCreditCost": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991,
                    "description": "The per-item `creditCost` from `checkouts/quoteDropshipping`. Send it when `dropShip` is true."
                  },
                  "expectedDropshippingPolicyRevision": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991,
                    "exclusiveMinimum": 0,
                    "description": "The `revision` from `checkouts/quoteDropshipping`, converted from a string to a number. Send it when `dropShip` is true."
                  },
                  "lines": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 50,
                    "items": {
                      "type": "object",
                      "properties": {
                        "productId": {
                          "type": "string",
                          "minLength": 1,
                          "description": "The product's ID."
                        },
                        "quantity": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 1000,
                          "description": "How many units to order."
                        }
                      },
                      "required": [
                        "productId",
                        "quantity"
                      ]
                    },
                    "description": "The products to order. Each product can appear only once."
                  },
                  "dropShip": {
                    "type": "boolean",
                    "default": false,
                    "description": "Whether the order uses dropshipping. Defaults to false. A dropshipped order ships with your branded receipt instead of the Arcade invoice, once your brand is set up in Arcade Studio. Set it to true when any line has quantity 1, unless you have a paid plan that includes dropshipping; otherwise the request returns `412 PRECONDITION_FAILED`."
                  }
                },
                "required": [
                  "requestId",
                  "lines"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "checkoutId": {
                      "type": "string",
                      "pattern": "^\\d+$",
                      "description": "The checkout's ID. After payment, pass it to `orders/get` to find the order."
                    },
                    "checkoutUrl": {
                      "type": "string",
                      "format": "uri",
                      "description": "The page where the checkout is paid. The host can change."
                    }
                  },
                  "required": [
                    "checkoutId",
                    "checkoutUrl"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/orders/get": {
      "post": {
        "operationId": "orders.get",
        "summary": "Retrieve an order",
        "description": "Retrieves an order by its `orderId`, or by the `checkoutId` of the checkout that placed it. Send exactly one of the two. A `checkoutId` returns `404` until the checkout is paid.",
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "orderId": {
                    "type": "string",
                    "pattern": "^\\d+$",
                    "description": "The order's ID."
                  },
                  "checkoutId": {
                    "type": "string",
                    "pattern": "^\\d+$",
                    "description": "The checkout's ID. After payment, pass it to `orders/get` to find the order."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orderId": {
                      "type": "string",
                      "pattern": "^\\d+$",
                      "description": "The order's ID."
                    },
                    "orderCode": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The Arcade order code. Null when the order has none."
                    },
                    "orderNumber": {
                      "type": "string",
                      "description": "The order number to show people, such as \"#1042\"."
                    },
                    "status": {
                      "enum": [
                        "ordered",
                        "cadReview",
                        "sampleReview",
                        "inProduction",
                        "inReview",
                        "inCorrection",
                        "approved",
                        "updatedInfo",
                        "shipped",
                        "delivered",
                        "fulfilled",
                        "refunded"
                      ],
                      "type": "string",
                      "description": "Where the order stands, based on the makers' progress and any refunds."
                    },
                    "placedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the order was placed."
                    },
                    "total": {
                      "type": "object",
                      "properties": {
                        "amount": {
                          "type": "string",
                          "description": "Decimal amount, e.g. \"48.00\""
                        },
                        "currency": {
                          "type": "string",
                          "description": "The currency, as an ISO 4217 code such as USD."
                        }
                      },
                      "required": [
                        "amount",
                        "currency"
                      ],
                      "description": "The order's total."
                    },
                    "itemCount": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991,
                      "description": "How many units the order holds."
                    },
                    "imageUrl": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uri"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "URL of the image. It expires; call the endpoint again for a fresh one. The host can change."
                    },
                    "lines": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "productId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "description": "The product's ID."
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The product, when the line is one of your products. Null otherwise."
                          },
                          "title": {
                            "type": "string",
                            "description": "The product's title."
                          },
                          "selectionLabel": {
                            "type": "string",
                            "description": "A readable summary of the line's options. For a line that is not one of your products, the line's title."
                          },
                          "quantity": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991,
                            "description": "How many units were ordered."
                          },
                          "total": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "amount": {
                                    "type": "string",
                                    "description": "Decimal amount, e.g. \"48.00\""
                                  },
                                  "currency": {
                                    "type": "string",
                                    "description": "The currency, as an ISO 4217 code such as USD."
                                  }
                                },
                                "required": [
                                  "amount",
                                  "currency"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The line's total after its discounts. Null when unknown."
                          },
                          "imageUrl": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uri"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "URL of the image. It expires; call the endpoint again for a fresh one. The host can change."
                          },
                          "makerName": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The maker producing this line. Null when unknown."
                          }
                        },
                        "required": [
                          "productId",
                          "title",
                          "selectionLabel",
                          "quantity",
                          "total",
                          "imageUrl",
                          "makerName"
                        ]
                      },
                      "description": "The products in the order."
                    },
                    "subtotal": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string",
                              "description": "Decimal amount, e.g. \"48.00\""
                            },
                            "currency": {
                              "type": "string",
                              "description": "The currency, as an ISO 4217 code such as USD."
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The total of the lines, before shipping and tax."
                    },
                    "shipping": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string",
                              "description": "Decimal amount, e.g. \"48.00\""
                            },
                            "currency": {
                              "type": "string",
                              "description": "The currency, as an ISO 4217 code such as USD."
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The shipping cost."
                    },
                    "tax": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string",
                              "description": "Decimal amount, e.g. \"48.00\""
                            },
                            "currency": {
                              "type": "string",
                              "description": "The currency, as an ISO 4217 code such as USD."
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The tax."
                    },
                    "volumeDiscount": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string",
                              "description": "Decimal amount, e.g. \"48.00\""
                            },
                            "currency": {
                              "type": "string",
                              "description": "The currency, as an ISO 4217 code such as USD."
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The makers' volume discount."
                    },
                    "discounts": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "string",
                              "description": "Decimal amount, e.g. \"48.00\""
                            },
                            "currency": {
                              "type": "string",
                              "description": "The currency, as an ISO 4217 code such as USD."
                            }
                          },
                          "required": [
                            "amount",
                            "currency"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Other discounts, not counting the volume discount."
                    },
                    "shippingAddress": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "The recipient's name."
                            },
                            "city": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "The city."
                            },
                            "provinceCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "The state or province code, such as CA."
                            },
                            "countryCode": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "The country code, such as US."
                            }
                          },
                          "required": [
                            "name",
                            "city",
                            "provinceCode",
                            "countryCode"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Where the order ships. Null when there is no address."
                    },
                    "tracking": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "company": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The carrier."
                          },
                          "number": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The tracking number."
                          },
                          "url": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uri"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "A page that tracks the shipment."
                          }
                        },
                        "required": [
                          "company",
                          "number",
                          "url"
                        ]
                      },
                      "description": "Tracking for each shipment sent so far."
                    },
                    "refunds": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "createdAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "When the refund was made."
                          },
                          "amount": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "amount": {
                                    "type": "string",
                                    "description": "Decimal amount, e.g. \"48.00\""
                                  },
                                  "currency": {
                                    "type": "string",
                                    "description": "The currency, as an ISO 4217 code such as USD."
                                  }
                                },
                                "required": [
                                  "amount",
                                  "currency"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The amount refunded."
                          }
                        },
                        "required": [
                          "createdAt",
                          "amount"
                        ]
                      },
                      "description": "Refunds made on the order."
                    }
                  },
                  "required": [
                    "orderId",
                    "orderCode",
                    "orderNumber",
                    "status",
                    "placedAt",
                    "total",
                    "itemCount",
                    "imageUrl",
                    "lines",
                    "subtotal",
                    "shipping",
                    "tax",
                    "volumeDiscount",
                    "discounts",
                    "shippingAddress",
                    "tracking",
                    "refunds"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/orders/list": {
      "post": {
        "operationId": "orders.list",
        "summary": "List orders",
        "description": "Lists your orders, newest first.",
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cursor": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The `nextCursor` from the previous page. Omit it for the first page."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50,
                    "default": 20,
                    "description": "How many results to return per page."
                  },
                  "status": {
                    "enum": [
                      "ordered",
                      "cadReview",
                      "sampleReview",
                      "inProduction",
                      "inReview",
                      "inCorrection",
                      "approved",
                      "updatedInfo",
                      "shipped",
                      "delivered",
                      "fulfilled",
                      "refunded"
                    ],
                    "type": "string",
                    "description": "Only orders in this status"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orderId": {
                            "type": "string",
                            "pattern": "^\\d+$",
                            "description": "The order's ID."
                          },
                          "orderCode": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The Arcade order code. Null when the order has none."
                          },
                          "orderNumber": {
                            "type": "string",
                            "description": "The order number to show people, such as \"#1042\"."
                          },
                          "status": {
                            "enum": [
                              "ordered",
                              "cadReview",
                              "sampleReview",
                              "inProduction",
                              "inReview",
                              "inCorrection",
                              "approved",
                              "updatedInfo",
                              "shipped",
                              "delivered",
                              "fulfilled",
                              "refunded"
                            ],
                            "type": "string",
                            "description": "Where the order stands, based on the makers' progress and any refunds."
                          },
                          "placedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the order was placed."
                          },
                          "total": {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "string",
                                "description": "Decimal amount, e.g. \"48.00\""
                              },
                              "currency": {
                                "type": "string",
                                "description": "The currency, as an ISO 4217 code such as USD."
                              }
                            },
                            "required": [
                              "amount",
                              "currency"
                            ],
                            "description": "The order's total."
                          },
                          "itemCount": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991,
                            "description": "How many units the order holds."
                          },
                          "imageUrl": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uri"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "URL of the image. It expires; call the endpoint again for a fresh one. The host can change."
                          },
                          "lines": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "productId": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "description": "The product's ID."
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "The product, when the line is one of your products. Null otherwise."
                                },
                                "title": {
                                  "type": "string",
                                  "description": "The product's title."
                                },
                                "selectionLabel": {
                                  "type": "string",
                                  "description": "A readable summary of the line's options. For a line that is not one of your products, the line's title."
                                },
                                "quantity": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991,
                                  "description": "How many units were ordered."
                                },
                                "total": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "amount": {
                                          "type": "string",
                                          "description": "Decimal amount, e.g. \"48.00\""
                                        },
                                        "currency": {
                                          "type": "string",
                                          "description": "The currency, as an ISO 4217 code such as USD."
                                        }
                                      },
                                      "required": [
                                        "amount",
                                        "currency"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "The line's total after its discounts. Null when unknown."
                                },
                                "imageUrl": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "format": "uri"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "URL of the image. It expires; call the endpoint again for a fresh one. The host can change."
                                },
                                "makerName": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "The maker producing this line. Null when unknown."
                                }
                              },
                              "required": [
                                "productId",
                                "title",
                                "selectionLabel",
                                "quantity",
                                "total",
                                "imageUrl",
                                "makerName"
                              ]
                            },
                            "description": "The products in the order."
                          }
                        },
                        "required": [
                          "orderId",
                          "orderCode",
                          "orderNumber",
                          "status",
                          "placedAt",
                          "total",
                          "itemCount",
                          "imageUrl",
                          "lines"
                        ]
                      },
                      "description": "Newest first"
                    },
                    "nextCursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Pass this as `cursor` to get the next page. Null on the last page. With a `status` filter, a page can hold fewer than `limit` orders."
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/feedback/create": {
      "post": {
        "operationId": "feedback.create",
        "summary": "Send feedback",
        "description": "Sends a report about the API to the Arcade team: what you expected, what happened, and the request and response involved. Leave out credentials and personal data; the server also drops URL query strings, API keys and credential fields before the team sees the report.\n\n`requestId` identifies the report. It is not an idempotency key: a retry after an error may deliver the report twice. Returns `503` while feedback is unavailable.",
        "tags": [
          "Feedback"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requestId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "Caller-chosen ID of the report; quote it to Arcade. Not an idempotency key: a retry may deliver the report twice."
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000,
                    "description": "What you expected, what happened and what you tried"
                  },
                  "procedure": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "The procedure the report is about, e.g. \"patterns/create\""
                  },
                  "request": {
                    "type": "object",
                    "properties": {
                      "body": {
                        "description": "The JSON body you sent"
                      },
                      "userAgent": {
                        "type": "string",
                        "maxLength": 500,
                        "description": "The User-Agent you sent"
                      }
                    },
                    "description": "The request the report is about"
                  },
                  "response": {
                    "type": "object",
                    "properties": {
                      "status": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 599,
                        "description": "HTTP status; 0 when no response arrived"
                      },
                      "body": {
                        "description": "The body you received"
                      },
                      "durationMs": {
                        "type": "number",
                        "minimum": 0,
                        "description": "How long the request took, in milliseconds."
                      }
                    },
                    "description": "The response the report is about"
                  },
                  "agent": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "The agent or client that filed the report, e.g. \"claude-code\""
                  },
                  "reportedAt": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When the issue was seen"
                  }
                },
                "required": [
                  "requestId",
                  "text"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "requestId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "description": "Caller-chosen ID of the report; quote it to Arcade. Not an idempotency key: a retry may deliver the report twice."
                    }
                  },
                  "required": [
                    "requestId"
                  ]
                }
              }
            }
          }
        }
      }
    }
  }
}
