Dispute routes: accept, answer, appeal, decide
The Dispute Verbs accept, answer, appeal, decide as api.sb routes, with inputs, result, refusals and an example.
Reference for Dispute, one group of Dispute routes.
Dispute.accept
Accept concedes an open Dispute without contest, so the buyer keeps the held amount and the Dispute closes. Verb page.
POST /{namespace}/ disputes/ {dispute}/ acceptPath: dispute. Body, as JSON: the other inputs. Emits Dispute.accepted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
dispute | Dispute | required | The open Dispute. |
reason | text | required | Why contesting is not worth it, such as a fraud chargeback with no delivery Evidence. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
dispute | Dispute | required | The closed Dispute, decided for the buyer. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
curl -X POST https: //api.sb/ leaseline.app/ disputes/ dp_gywlshZJ7A/ accept \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"reason": "Example reason"}'{
"api": "https: //api.sb/ leaseline.app",
"dispute": {
"$id": "https: //api.sb/ leaseline.app/ disputes/ dp_gywlshZJ7A",
"$type": "Dispute",
"kind": "chargeback",
"status": "open",
"held": {
"amount": 29,
"currency": "USD"
},
"reason": "Example reason"
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Dispute.accept",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}Dispute.answer
Answer submits the seller’s Evidence on an open Dispute before its deadline: the contract, the delivered work, and its verdicts. Verb page.
POST /{namespace}/ disputes/ {dispute}/ answerPath: dispute. Body, as JSON: the other inputs. Emits Dispute.answered.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
dispute | Dispute | required | The open Dispute. |
evidence | list of Evidence | required | The records that show the promise was kept. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
dispute | Dispute | required | The answered Dispute. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
curl -X POST https: //api.sb/ leaseline.app/ disputes/ dp_gywlshZJ7A/ answer \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"evidence": ["evidence_6xsa6iYImd"]}'{
"api": "https: //api.sb/ leaseline.app",
"dispute": {
"$id": "https: //api.sb/ leaseline.app/ disputes/ dp_gywlshZJ7A",
"$type": "Dispute",
"kind": "chargeback",
"status": "answered",
"held": {
"amount": 29,
"currency": "USD"
},
"reason": "Example reason"
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Dispute.answer",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}Dispute.appeal
Appeal asks for one review of a decided Dispute by a Worker who took no part in the first decision. Verb page.
POST /{namespace}/ disputes/ {dispute}/ appealPath: dispute. Body, as JSON: the other inputs. Emits Dispute.appealed.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
dispute | Dispute | required | The decided Dispute. |
reason | text | required | What the first decision got wrong. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
dispute | Dispute | required | The appealed Dispute. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
curl -X POST https: //api.sb/ leaseline.app/ disputes/ dp_gywlshZJ7A/ appeal \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"reason": "Example reason"}'{
"api": "https: //api.sb/ leaseline.app",
"dispute": {
"$id": "https: //api.sb/ leaseline.app/ disputes/ dp_gywlshZJ7A",
"$type": "Dispute",
"kind": "chargeback",
"status": "appealed",
"held": {
"amount": 29,
"currency": "USD"
},
"reason": "Example reason"
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Dispute.appeal",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}Dispute.decide
Decide rules on an answered Dispute for the buyer, the seller, or a split, and releases or returns the held amount. Verb page.
POST /{namespace}/ disputes/ {dispute}/ decidePath: dispute. Body, as JSON: the other inputs. Emits Dispute.decided.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
dispute | Dispute | required | The answered Dispute. |
decision | string | required | One of buyer, seller, or split. |
reason | text | required | Why, citing the Evidence and the contract term it turns on. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
dispute | Dispute | required | The decided Dispute. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
curl -X POST https: //api.sb/ leaseline.app/ disputes/ dp_gywlshZJ7A/ decide \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"decision": "buyer", "reason": "Example reason"}'{
"api": "https: //api.sb/ leaseline.app",
"dispute": {
"$id": "https: //api.sb/ leaseline.app/ disputes/ dp_gywlshZJ7A",
"$type": "Dispute",
"kind": "chargeback",
"status": "decided",
"held": {
"amount": 29,
"currency": "USD"
},
"reason": "Example reason"
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Dispute.decide",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}