End an agreement (provider)
POST
/dsp/agreements/{id}/termination
const url = 'https://example.com/dsp/agreements/example/termination';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/dsp/agreements/example/termination \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{}'Not part of DSP (decisions #76): the consumer ends an agreement with an AgreementTerminationMessage. Running transfers under it end. The same message again gets the same answer.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
The id of the agreement.
Request Bodyrequired
Section titled “Request Bodyrequired”An AgreementTerminationMessage for this agreement.
Media typeapplication/json
object
Example generated
{}Responses
Section titled “Responses”Ended.
Media typeapplication/json
object
Example generated
{}The request is not valid.
Media typeapplication/json
A DSP error (dspace:…Error): code and reason, as JSON-LD.
object
@context
required
object
@type
required
E.g. ContractNegotiationError.
string
code
required
string
reason
required
Array<string>
Example generated
{ "@context": {}, "@type": "example", "code": "example", "reason": [ "example" ]}Not authenticated.
Media typeapplication/json
A DSP error (dspace:…Error): code and reason, as JSON-LD.
object
@context
required
object
@type
required
E.g. ContractNegotiationError.
string
code
required
string
reason
required
Array<string>
Example generated
{ "@context": {}, "@type": "example", "code": "example", "reason": [ "example" ]}Unknown agreement.
Media typeapplication/json
A DSP error (dspace:…Error): code and reason, as JSON-LD.
object
@context
required
object
@type
required
E.g. ContractNegotiationError.
string
code
required
string
reason
required
Array<string>
Example generated
{ "@context": {}, "@type": "example", "code": "example", "reason": [ "example" ]}