← All operations
POST/api/v1/admin/bounties/{bountyId}/disputes/{disputeId}/resolution

Jobs_ResolveBountyDispute

Authentication
required-admin
Cache policy
none
Success and errors
202, 400, 401, 403, 404, 409, 500, 503
Stability
v1 stable contract

OpenAPI operation

{
  "operationId": "Jobs_ResolveBountyDispute",
  "summary": "POST /api/v1/admin/bounties/{bountyId}/disputes/{disputeId}/resolution",
  "tags": [
    "Jobs"
  ],
  "parameters": [
    {
      "name": "bountyId",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    },
    {
      "name": "disputeId",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "format": "uuid"
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "resolution": {
              "type": "string",
              "enum": [
                "RELEASE",
                "REFUND",
                "SPLIT"
              ]
            },
            "unitsToProvider": {
              "type": "string",
              "maxLength": 78,
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "unitsToClient": {
              "type": "string",
              "maxLength": 78,
              "pattern": "^(?:0|[1-9][0-9]*)$"
            },
            "reason": {
              "type": "string",
              "minLength": 20,
              "maxLength": 10000
            },
            "expectedVersion": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "dryRun": {
              "default": true,
              "type": "boolean"
            },
            "confirmation": {
              "type": "string",
              "maxLength": 500
            },
            "approvedCommandHash": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{43}$"
            }
          },
          "required": [
            "resolution",
            "unitsToProvider",
            "unitsToClient",
            "reason",
            "expectedVersion"
          ],
          "additionalProperties": false
        }
      }
    }
  },
  "security": [
    {
      "cookieAuth": []
    }
  ],
  "responses": {
    "202": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "data",
              "meta"
            ],
            "properties": {
              "data": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "PREVIEW"
                      },
                      "bountyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "disputeId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "expectedVersion": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "commandHash": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9_-]{43}$"
                      },
                      "confirmation": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "resolution": {
                        "type": "string",
                        "enum": [
                          "RELEASE",
                          "REFUND",
                          "SPLIT"
                        ]
                      },
                      "unitsToProvider": {
                        "type": "string",
                        "maxLength": 78,
                        "pattern": "^(?:0|[1-9][0-9]*)$"
                      },
                      "unitsToClient": {
                        "type": "string",
                        "maxLength": 78,
                        "pattern": "^(?:0|[1-9][0-9]*)$"
                      },
                      "network": {
                        "type": "string",
                        "maxLength": 240
                      },
                      "contractAddress": {
                        "type": "string",
                        "pattern": "^0x[0-9a-fA-F]{40}$"
                      },
                      "walletPublicId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "decisionDigest": {
                        "type": "string",
                        "pattern": "^0x[0-9a-fA-F]{64}$"
                      }
                    },
                    "required": [
                      "kind",
                      "bountyId",
                      "disputeId",
                      "expectedVersion",
                      "commandHash",
                      "confirmation",
                      "resolution",
                      "unitsToProvider",
                      "unitsToClient",
                      "network",
                      "contractAddress",
                      "walletPublicId",
                      "decisionDigest"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "ACCEPTED"
                      },
                      "bountyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "disputeId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "commandId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "commandHash": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9_-]{43}$"
                      },
                      "auditEventId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "transactionIntentId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "bountyVersion": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "disputeVersion": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "RELEASE_PENDING",
                          "REFUND_PENDING"
                        ]
                      },
                      "unitsToProvider": {
                        "type": "string",
                        "maxLength": 78,
                        "pattern": "^(?:0|[1-9][0-9]*)$"
                      },
                      "unitsToClient": {
                        "type": "string",
                        "maxLength": 78,
                        "pattern": "^(?:0|[1-9][0-9]*)$"
                      }
                    },
                    "required": [
                      "kind",
                      "bountyId",
                      "disputeId",
                      "commandId",
                      "commandHash",
                      "auditEventId",
                      "transactionIntentId",
                      "bountyVersion",
                      "disputeVersion",
                      "state",
                      "unitsToProvider",
                      "unitsToClient"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "meta": {
                "type": "object",
                "additionalProperties": true,
                "required": [
                  "requestId",
                  "schemaVersion",
                  "buildVersion",
                  "generatedAt",
                  "freshness"
                ],
                "properties": {
                  "requestId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "schemaVersion": {
                    "type": "string"
                  },
                  "buildVersion": {
                    "type": "string"
                  },
                  "generatedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "freshness": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "projectedAt",
                      "sourceWatermark"
                    ],
                    "properties": {
                      "projectedAt": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "sourceWatermark": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "400": {
      "description": "invalid request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/ApiError"
          }
        }
      }
    },
    "401": {
      "description": "unauthenticated",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/ApiError"
          }
        }
      }
    },
    "403": {
      "description": "forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/ApiError"
          }
        }
      }
    },
    "404": {
      "description": "not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/ApiError"
          }
        }
      }
    },
    "409": {
      "description": "conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/ApiError"
          }
        }
      }
    },
    "500": {
      "description": "internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/ApiError"
          }
        }
      }
    },
    "503": {
      "description": "dependency unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/ApiError"
          }
        }
      }
    }
  },
  "x-auth-mode": "required-admin",
  "x-cache-policy": "none",
  "x-required-scopes": [],
  "x-rate-cost": 1,
  "x-stability": "STABLE"
}