A message on a negotiation
const url = 'https://example.com/dsp/negotiations/example/example';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/negotiations/example/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{}'The other messages of a negotiation, for both roles: request (ContractRequestMessage), offers (ContractOfferMessage), agreement (ContractAgreementMessage), events (ContractNegotiationEventMessage, ACCEPTED or FINALIZED) and termination (ContractNegotiationTerminationMessage). The same message again gets the same answer.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Our process id (providerPid or consumerPid).
request, offers, agreement, events or termination.
Request Bodyrequired
Section titled “Request Bodyrequired”The message that action names.
object
Example generated
{}Responses
Section titled “Responses”The ContractNegotiation.
object
Example generated
{}Not a valid message, or not allowed in the state of the process.
A DSP error (dspace:…Error): code and reason, as JSON-LD.
object
object
E.g. ContractNegotiationError.
Example generated
{ "@context": {}, "@type": "example", "code": "example", "reason": [ "example" ]}No valid token.
A DSP error (dspace:…Error): code and reason, as JSON-LD.
object
object
E.g. ContractNegotiationError.
Example generated
{ "@context": {}, "@type": "example", "code": "example", "reason": [ "example" ]}Unknown process.
A DSP error (dspace:…Error): code and reason, as JSON-LD.
object
object
E.g. ContractNegotiationError.
Example generated
{ "@context": {}, "@type": "example", "code": "example", "reason": [ "example" ]}The message could not be recorded as evidence, so it was not processed.
A DSP error (dspace:…Error): code and reason, as JSON-LD.
object
object
E.g. ContractNegotiationError.
Example generated
{ "@context": {}, "@type": "example", "code": "example", "reason": [ "example" ]}