Approve a request
const url = 'https://example.com/api/v1/negotiations/example/approve';const options = { method: 'POST', headers: { cookie: 'bl_%3Cslug%3E_session=%3Cbl_%3Cslug%3E_session%3E', 'Content-Type': 'application/json' }, body: '{"read_only":true,"points":["example"]}'};
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/api/v1/negotiations/example/approve \ --header 'Content-Type: application/json' \ --cookie bl_%3Cslug%3E_session=%3Cbl_%3Cslug%3E_session%3E \ --data '{ "read_only": true, "points": [ "example" ] }'As provider: approves a request that awaits an operator, and sends the agreement. The approval may narrow it to reading only or to some points. Writing is refused while another consumer steers the same objects (steering_taken): approve for reading only then. The body is optional.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The id of the negotiation.
Request Body
Section titled “Request Body”Responses
Section titled “Responses”OK.
A negotiation as the management API shows it.
object
The DSP endpoint of the counterparty.
The ODRL offer as sent or received.
object
The connection (subscription) this negotiation is part of, if any.
The messages and states so far: at, state, message_type,
direction, evidence_id, note.
object
Deadline of a pending approval.
The counterparty’s name in the registry of the authority.
The ODRL offer, as offer.
object
Our messages of this negotiation that are not delivered yet.
A row of the outbox: a message of ours to a counterparty, until it is delivered or dropped (decisions #56).
object
The negotiation, transfer or delegation the message belongs to.
Provider, single negotiation only: the objects of the product asked for.
Provider, single negotiation only: the points of the product, if it names them.
Provider, single negotiation only: other consumers that already steer
these objects (object, consumer_did, agreement_id).
object
Example
{ "role": "provider", "state": "INITIAL", "approval": "pending"}A point is not part of the product.
The body of every failed call to a management API.
object
object
Stable, machine-readable: invalid_request, unauthenticated,
forbidden, not_found, conflict, upstream_unavailable,
unavailable, internal, or a more specific code of the operation.
For people; may change between versions.
Example
{ "error": { "code": "not_found", "message": "unknown negotiation" }}No valid session, DPoP-bound token or API key.
The body of every failed call to a management API.
object
object
Stable, machine-readable: invalid_request, unauthenticated,
forbidden, not_found, conflict, upstream_unavailable,
unavailable, internal, or a more specific code of the operation.
For people; may change between versions.
Example
{ "error": { "code": "not_found", "message": "unknown negotiation" }}The caller lacks the role this operation needs; or a change with the session cookie came from a page of another site (cross_site_request, decisions #83).
The body of every failed call to a management API.
object
object
Stable, machine-readable: invalid_request, unauthenticated,
forbidden, not_found, conflict, upstream_unavailable,
unavailable, internal, or a more specific code of the operation.
For people; may change between versions.
Example
{ "error": { "code": "not_found", "message": "unknown negotiation" }}Not found.
The body of every failed call to a management API.
object
object
Stable, machine-readable: invalid_request, unauthenticated,
forbidden, not_found, conflict, upstream_unavailable,
unavailable, internal, or a more specific code of the operation.
For people; may change between versions.
Example
{ "error": { "code": "not_found", "message": "unknown negotiation" }}Not awaiting approval, expired, the consumer is no longer an active member, or steering_taken.
The body of every failed call to a management API.
object
object
Stable, machine-readable: invalid_request, unauthenticated,
forbidden, not_found, conflict, upstream_unavailable,
unavailable, internal, or a more specific code of the operation.
For people; may change between versions.
Example
{ "error": { "code": "not_found", "message": "unknown negotiation" }}